3 ms·
> async/await are not primitives. Mutexes, semaphores, atomic counts etc... those are true primitives in multithreading async/await, a way to model concurrency
by rubiquity 6y ago
> async/await are not primitives. Mutexes, semaphores, atomic counts etc... those are true primitives in multithreading
async/await, a way to model concurrency, and mutexes/semaphore/etc, a way to safely share data, belong to separate categories and one does not preclude the usage of the other, especially if your coroutines are allowed to run on different threads.
- asimpletune 6y agoI don’t think they meant one precludes the other, and “modeling concurrency” definitely is a “sharing data” problem. In other words, you would have to build a nicer concurrency abstraction out of a lower level primitive at some point.