3 ms·
Yeah goroutines are a pretty high level abstraction but they are definitely closer in concept to green threads than to coroutines. You can run a C++ coroutine
by jpc0 3y ago
Yeah goroutines are a pretty high level abstraction but they are definitely closer in concept to green threads than to coroutines.
You can run a C++ coroutine on a seperate thread but you effectively need to build all the task handling logic yourself of use a library that's build that out. Goroutines you don't need to use a specialised sleep fuction which is actually changing coroutine state, setting a timer and yeilding. You just sleep as an example