4 ms·
Async/await solves a different problem than green threads. Async/await works well when you need to manage scheduling of a single thread (very common in UI or o
by jayd16 6y ago
Async/await solves a different problem than green threads. Async/await works well when you need to manage scheduling of a single thread (very common in UI or other cross runtime tasks). Implicit green threads are nice if all you care about is total throughput across all threads. Its not great for keeping a single thread responsive.
- eweise 6y agoAsync / await is just an abstraction over threads. It doesn't dictate how many threads are used.
- jayd16 6y agoI'm not sure what your point is exactly but I would disagree with the presented assertions none the less. In C# async/await is essentially sugar around callbacks, which isn't really related to threads, per se. However, the language has the Task Parallel Library, and a Task promise type that has a lot of methods around scheduling and thread targeting. Essentially the TPL does dictate how many threads are used and is, as far as language design is concerned, inextricable from async/await.