By experiment, the runtime for the mainstream Go implementation seems to work with coroutines at first but then deadlocks eventually.
The deadlock cannot be prevented with GOGC=off
.
Fortunately, the C code in question can be readily converted to use pthreads
instead.