4 ms·
Well I'd say you have to take a lot of care to make them compose well. Just like it takes care to compose thread- and process-based concurrency, it takes care
by chubot 6y ago
Well I'd say you have to take a lot of care to make them compose well.
Just like it takes care to compose thread- and process-based concurrency, it takes care to compose threads and async correctly and comprehensibly.
If you care about utilization you MUST use threads (or processes, which are a different story). So if you use async, then you have the problem of composing them, which is indeed hard. There are some C++ codebases that do this well but they're notable for being exceptions ...
There does appear to be overuse of async as a premature optimization. The default should to use threads and explicitly shared state -- basically the idioms in Go, although I'm sure ownership complicates that a lot.