3 ms·
I think it's fair to say that Go was hardly the first language to implement the concept of coroutines[1]. Probably the only merit of Go here is the short and co
by scadge 9y ago
I think it's fair to say that Go was hardly the first language to implement the concept of coroutines[1]. Probably the only merit of Go here is the short and convenient name of the 'run' method.
[1] https://en.wikipedia.org/wiki/Coroutine#Implementations https://en.wikipedia.org/wiki/Coroutine#Implementations
- teamhappy 9y ago> libmill was a project that aimed to copy Go's > concurrency model to C 1:1 [...] > libdill is a follow-up project that experiments with > structured concurrency and diverges from the Go model. http://libdill.org/documentation.html http://libdill.org/documentation.html
- rumcajz 9y agoI would say the main advantage is being able to pass couroutine arguments as if it was a simple function. In other coroutine implementations in C (e.g. libtask) you have to make a struct containing all the args and pass that to the run function.