Boost logo

Boost :

Subject: Re: [boost] [coroutine2] Difference between coroutine and coroutine2
From: Oliver Kowalke (oliver.kowalke_at_[hidden])
Date: 2015-06-21 06:53:12


2015-06-21 12:19 GMT+02:00 Aaron Levy <aaron.levy_at_[hidden]>:

> Are boost::coroutines::symmetric_coroutine<> and
> boost::coroutines::asymmetric_coroutine<> part of the coroutine library or
> coroutine2 library. Besides being C++14-only, in what ways does coroutine2
> differ from coroutine?
>

Coroutine2 provides only boost::coroutines2::asymmetric_coroutine<>
(boost::coroutines2::coroutine<> is a typedef of the previous one).
Symmetric_coroutine<> (introduced for boost.fiber) is not implemented
because its functionality/semantic is better represented by class
boost::context::execution_context (part of boost.context).
Class execution_context is used as building block (implementation) of
boost::coroutines2::asymmetric_coroutine<> - the code becomes cleaner.


Boost list run by bdawes at acm.org, gregod at cs.rpi.edu, cpdaniel at pacbell.net, john at johnmaddock.co.uk