Earlier quoted context omitted.
Just like any other async/await model. Also you don't need explicit yield on task runtimes like HPX.
> Just like any other async/await model. I don't see how Go bears any resemblance to an async/await model. Did I misinterpret your statement? > Also you don't need explicit yield on task runtimes like HPX. I don't dispute that it's hypothetically possible to bolt enough things onto C++ to make it behave like Go, but I seriously doubt it's a viable solution. I would sincerely love to know if anyone has done all of thi…
Goroutines are coroutines.
On the async/await model there are two approaches.
1 - The compiler takes care of the scheduling of the coroutines among the threads on the task pool, like C# 5.0 introduced.
2 - The compiler maps async/await into intrisics that know magic functions on the handles that represent tasks managed by the thread pool. This is called generalized async/await and is how C++17 will do it, and also how the C# model will evolve on C# 7.0
So while one must restrict ourselves with the co-routine scheduler provided by the Go runtime and to the yield points managed by it, with generalized async/await it is possible to have control how the scheduling actually takes place among co-routines.
Granted Go's model is easier to understand and might be enough for many people, but it isn't a solution for all types of concurrency problems.