
On Sat, Jan 11, 2014 at 12:33 PM, Vicente J. Botet Escriba <vicente.botet@wanadoo.fr> wrote:
Why do Boost.Fiber need to use Boost.Coroutine instead of using directly Boost.Context? It seems to me that the implementation would be more efficient if it uses Boost.Context directly as a fiber is not a coroutine, isn't it?
Correct, a fiber is not a coroutine. Oliver is also bringing a proposal to the ISO C++ concurrency study group to introduce coroutines in the standard. Interestingly, he is not bringing a context-library proposal: the lowest-level standard API he is proposing is the coroutine API. But is the coroutine API low-level enough, and general enough, to serve as a foundation for higher-level abstractions such as fibers? You might regard the present fiber implementation as a proof-of-concept. Oliver asserts that using the Coroutine API rather than directly engaging the Context API has only trivial effect on performance.