This post is about why we need a coroutine package for Go, and what it would look like. But first, what are coroutines?
Every programmer today is familiar with function calls (subroutines): F calls G, which stops F and runs G. G does its work, potentially calling and waiting for other functions, and eventually returns. When G returns, G is gone and F continues running. In this pattern, only one function is running at a time, while its callers wait, all the way up the call stack.
All things programming and coding related. Subcommunity of Technology.
This community’s icon was made by Aaron Schneider, under the CC-BY-NC-SA 4.0 license.