Why implement coroutines when you have multithreading?
Coroutines are to me a brain-twisty way to make the most out of a single core, because your language doesn't support multithreading. For example: JavaScript with a single thread in the browser, Python with the GIL.
C++ has threads which ACTUALLY run in parallel on the CPU. Why bother complicating the language further?
Coroutines are to me a brain-twisty way to make the most out of a single core, because your language doesn't support multithreading. For example: JavaScript with a single thread in the browser, Python with the GIL.
C++ has threads which ACTUALLY run in parallel on the CPU. Why bother complicating the language further?