3 ms·
Right, that specific instance is essentially a single-threaded* application. Now imagine that you spawned a few hundred of them with JoinAll. Each would run, m
by esotericn 7y ago
Right, that specific instance is essentially a single-threaded* application.
Now imagine that you spawned a few hundred of them with JoinAll. Each would run, multiplexed within a single thread, with execution being passed at the await points.
* anyone know the correct nomenclature for this? Single-coroutine?
- fzzzy 7y agoCooperative threads are still threads, they just aren't preemptive.
- esotericn 7y agoI suppose you're right. The example is both single-threaded at the OS level and single-threaded at the program level.
- staticassertion 7y agoSerial?