Over the past two weeks, I've been reading through the concurrency proposals and catching up on concurrency-related WWDC videos. One thing I didn't see discussed much is this: how does Swift Concurrency work with CPU-bound tasks, as opposed to IO-bound tasks? Many of the examples describe asynchronous I/O, and that seems like it will work very well with the cooperative threading model.
But for CPU-bound tasks (let's say a parallel sort we want to distribute over multiple CPU's), is
await a good match? Is there a way for tasks to yield to other threads after finishing a chunk of work? Will they starve other tasks of CPU time?
Or are we better off sticking to threads and GCD queues for this kind of work?