3 ms·
Multithreading and coroutines are different concepts though in practice they may end up being the same thing. Coroutines were invented surprisingly enough, for
by chewxy 4y ago
Multithreading and coroutines are different concepts though in practice they may end up being the same thing.
Coroutines were invented surprisingly enough, for lexing and parsing[0].
[0] http://melconway.com/Home/pdf/compiler.pdf http://melconway.com/Home/pdf/compiler.pdf
Edit1: added source. I'm surprised Melvin Conway is still alive
- throwaway2016a 4y agoInteresting information. Thank you for the link, I'll have to take a look. Though, the "in practice" part is the thing that gets me. I can see how the code might be easier to read but performance wise it seems like a lot of overhead since the coroutines are unlikely to be doing things like waiting for I/O.