a simple coroutine for c++