back

by worik·6mo ago·view on hn ↗
Async/await is not a solution to poor thread models.

Async/await is cooperative multitasking and is no help at all for cpu bound problems.

For i/o intensive systems it makes non-blocking i/o look like blocking i/o, and people find that helpful.

I do real-time i/o so I need more control and Async/await is unhelpful.

It is a worthy adition to Swift I agree. But they sorely lack Rust's excellent design in this area

1 comments
I use async/await for my CPU bound problems and it works fine
So long as you "await"

Not really concurrent

Not very well known, but Swift has two builtin concurrency systems (in addition to the very well known async/await for parallelism): async let (not very flexible) and task groups (much more so).
You don’t have to await immediately!