2 ms·
>you take on all the complexities of threads Well no, not _all_ of the complexities because you have await and explicit yielding. It's much easier to pass dat
by jayd16 5y ago
>you take on all the complexities of threads
Well no, not _all_ of the complexities because you have await and explicit yielding. It's much easier to pass data from one asynchronous task to another using await than it is to, say, manually code the locks or state machine necessary for the message passing and/or callbacks.
- Spivak 5y agoAwait and explicit yielding do nothing as soon as you want to actually run multiple tasks at the same time in parallel instead of sequentially but interleaved.
- jayd16 5y agoYou can just start the tasks and then await all? At least in C# it also provides a clear system on how to switch scheduling contexts at an await.