C++ libraries that implement Go goroutines or Go channels?

This question and in a general a google search for "C++ coroutines" should get you something close. The SO question suggests trying Boost::coroutine.

If you don't mind wrapping C you might be able to try libtask. Which was written by Russ Cox (one of the official Go dev team) before work on Go began. I've only used it in C though, so I don't know if it's applicable.

Go channels are implemented as locking queues by the way, so you might be able to incorporate a similar mechanism using regular threads.


If your aim is primarily speeding up compute things, Intel's TBB (Threading Building Blocks) is (IMHO) a better option than rolling your own inferior version from boost::thread.