ylliX - Online Advertising Network

Synchronous functions can support cancellation too

Cancellation is a Swift concurrency feature, but this doesn’t mean it’s only available in async functions. Synchronous functions can also support cancellation, and by doing so they’ll become better concurrency citizens when called from async code. Supporting cancellation makes sense for functions that can block for significant amounts of time (say, more than a few […]