4 ms·
Go doesn't have coroutines-the-flow-control-construct. It has goroutines, which are lightweight preemptively scheduled threads. You can, on top of this thing, a
by anonymoushn 5y ago
Go doesn't have coroutines-the-flow-control-construct. It has goroutines, which are lightweight preemptively scheduled threads. You can, on top of this thing, arrange for a bunch of goroutines only one of which is not blocked at a time, which is a bit like having coroutines, but probably involves more synchronization code than a typical implementation of coroutines-the-flow-control-construct.
- gpderetta 5y agoWell channels do randez-vous, conceptually similar yield. Having only one coroutine running at any time is really not required. Disclaimer: I have never written a line of Go in my life.