Implementing Lua Coroutines in Go

“Coroutines are computer program components that generalize subroutines to allow multiple entry points for suspending and resuming execution at certain locations. Now, I can already hear the gophers scream “CHANNELS”! Yes, spoiler alert, channels will be summoned, but the goal is to build a higher-level abstraction that mimics as close as possible Lua’s coroutine.* API and features…”

http://0value.com/implementing-lua-coroutines-in-Go