mirror of
https://github.com/boostorg/coroutine2.git
synced 2025-05-09 23:24:01 +00:00
rename of caputed_context to execution_context (v2)
- execution_context (v2) is enabled per default - execution_context (v1) is enabled for property segmented-stacks=on
This commit is contained in:
parent
671b94df94
commit
fdf24a0607
@ -9,12 +9,18 @@
|
||||
|
||||
#include <boost/coroutine2/all.hpp>
|
||||
|
||||
using namespace boost::coroutines2;
|
||||
|
||||
asymmetric_coroutine<int>::pull_type make_dummy_range()
|
||||
{
|
||||
return asymmetric_coroutine<int>::pull_type([](asymmetric_coroutine<int>::push_type& yield)
|
||||
{
|
||||
yield(1);
|
||||
});
|
||||
}
|
||||
|
||||
int main() {
|
||||
boost::coroutines2::coroutine< void >::push_type sink(
|
||||
[]( boost::coroutines2::coroutine< void >::pull_type & source) {
|
||||
std::cout << "inside coroutine-fn" << std::endl;
|
||||
});
|
||||
sink();
|
||||
std::distance(make_dummy_range()); // error
|
||||
std::cout << "Done" << std::endl;
|
||||
return EXIT_SUCCESS;
|
||||
}
|
||||
|
@ -8,6 +8,7 @@
|
||||
#define BOOST_COROUTINES2_DETAIL_COROUTINE_HPP
|
||||
|
||||
#include <boost/config.hpp>
|
||||
#include <boost/context/detail/config.hpp>
|
||||
|
||||
#ifdef BOOST_HAS_ABI_HEADERS
|
||||
# include BOOST_ABI_PREFIX
|
||||
@ -28,24 +29,25 @@ class push_coroutine;
|
||||
#include <boost/coroutine2/detail/pull_coroutine.hpp>
|
||||
#include <boost/coroutine2/detail/push_coroutine.hpp>
|
||||
|
||||
#if ! defined(BOOST_USE_EXECUTION_CONTEXT)
|
||||
#include <boost/coroutine2/detail/pull_control_block_cc.hpp>
|
||||
#include <boost/coroutine2/detail/push_control_block_cc.hpp>
|
||||
#else
|
||||
#include <boost/coroutine2/detail/pull_control_block_ec.hpp>
|
||||
#include <boost/coroutine2/detail/push_control_block_ec.hpp>
|
||||
#endif
|
||||
#if defined(BOOST_EXECUTION_CONTEXT)
|
||||
# if (BOOST_EXECUTION_CONTEXT==1)
|
||||
# include <boost/coroutine2/detail/pull_control_block_ecv1.hpp>
|
||||
# include <boost/coroutine2/detail/push_control_block_ecv1.hpp>
|
||||
# else
|
||||
# include <boost/coroutine2/detail/pull_control_block_ecv2.hpp>
|
||||
# include <boost/coroutine2/detail/push_control_block_ecv2.hpp>
|
||||
# endif
|
||||
|
||||
#include <boost/coroutine2/detail/pull_coroutine.ipp>
|
||||
#include <boost/coroutine2/detail/push_coroutine.ipp>
|
||||
# include <boost/coroutine2/detail/pull_coroutine.ipp>
|
||||
# include <boost/coroutine2/detail/push_coroutine.ipp>
|
||||
|
||||
#if ! defined(BOOST_USE_EXECUTION_CONTEXT)
|
||||
#include <boost/coroutine2/detail/pull_control_block_cc.hpp>
|
||||
#include <boost/coroutine2/detail/pull_control_block_cc.ipp>
|
||||
#include <boost/coroutine2/detail/push_control_block_cc.ipp>
|
||||
#else
|
||||
#include <boost/coroutine2/detail/pull_control_block_ec.ipp>
|
||||
#include <boost/coroutine2/detail/push_control_block_ec.ipp>
|
||||
# if (BOOST_EXECUTION_CONTEXT==1)
|
||||
# include <boost/coroutine2/detail/pull_control_block_ecv1.ipp>
|
||||
# include <boost/coroutine2/detail/push_control_block_ecv1.ipp>
|
||||
# else
|
||||
# include <boost/coroutine2/detail/pull_control_block_ecv2.ipp>
|
||||
# include <boost/coroutine2/detail/push_control_block_ecv2.ipp>
|
||||
# endif
|
||||
#endif
|
||||
|
||||
#ifdef BOOST_HAS_ABI_HEADERS
|
||||
|
@ -11,7 +11,7 @@
|
||||
#include <type_traits>
|
||||
|
||||
#include <boost/config.hpp>
|
||||
#include <boost/context/captured_context.hpp>
|
||||
#include <boost/context/execution_context.hpp>
|
||||
|
||||
#include <boost/coroutine2/detail/state.hpp>
|
||||
|
||||
@ -25,7 +25,7 @@ namespace detail {
|
||||
|
||||
template< typename T >
|
||||
struct pull_coroutine< T >::control_block {
|
||||
boost::context::captured_context ctx;
|
||||
boost::context::execution_context ctx;
|
||||
typename push_coroutine< T >::control_block * other;
|
||||
state_t state;
|
||||
std::exception_ptr except;
|
||||
@ -37,7 +37,7 @@ struct pull_coroutine< T >::control_block {
|
||||
template< typename StackAllocator, typename Fn >
|
||||
control_block( context::preallocated, StackAllocator, Fn &&);
|
||||
|
||||
control_block( typename push_coroutine< T >::control_block *, boost::context::captured_context &) noexcept;
|
||||
control_block( typename push_coroutine< T >::control_block *, boost::context::execution_context &) noexcept;
|
||||
|
||||
~control_block();
|
||||
|
||||
@ -57,7 +57,7 @@ struct pull_coroutine< T >::control_block {
|
||||
|
||||
template< typename T >
|
||||
struct pull_coroutine< T & >::control_block {
|
||||
boost::context::captured_context ctx;
|
||||
boost::context::execution_context ctx;
|
||||
typename push_coroutine< T & >::control_block * other;
|
||||
state_t state;
|
||||
std::exception_ptr except;
|
||||
@ -68,7 +68,7 @@ struct pull_coroutine< T & >::control_block {
|
||||
template< typename StackAllocator, typename Fn >
|
||||
control_block( context::preallocated, StackAllocator, Fn &&);
|
||||
|
||||
control_block( typename push_coroutine< T & >::control_block *, boost::context::captured_context &) noexcept;
|
||||
control_block( typename push_coroutine< T & >::control_block *, boost::context::execution_context &) noexcept;
|
||||
|
||||
control_block( control_block &) = delete;
|
||||
control_block & operator=( control_block &) = delete;
|
||||
@ -83,7 +83,7 @@ struct pull_coroutine< T & >::control_block {
|
||||
};
|
||||
|
||||
struct pull_coroutine< void >::control_block {
|
||||
boost::context::captured_context ctx;
|
||||
boost::context::execution_context ctx;
|
||||
push_coroutine< void >::control_block * other;
|
||||
state_t state;
|
||||
std::exception_ptr except;
|
||||
@ -93,7 +93,7 @@ struct pull_coroutine< void >::control_block {
|
||||
template< typename StackAllocator, typename Fn >
|
||||
control_block( context::preallocated, StackAllocator, Fn &&);
|
||||
|
||||
control_block( push_coroutine< void >::control_block *, boost::context::captured_context &) noexcept;
|
||||
control_block( push_coroutine< void >::control_block *, boost::context::execution_context &) noexcept;
|
||||
|
||||
control_block( control_block &) = delete;
|
||||
control_block & operator=( control_block &) = delete;
|
@ -15,7 +15,7 @@
|
||||
#include <boost/assert.hpp>
|
||||
#include <boost/config.hpp>
|
||||
|
||||
#include <boost/context/captured_context.hpp>
|
||||
#include <boost/context/execution_context.hpp>
|
||||
|
||||
#include <boost/coroutine2/detail/config.hpp>
|
||||
#include <boost/coroutine2/detail/forced_unwind.hpp>
|
||||
@ -33,7 +33,7 @@ namespace detail {
|
||||
template< typename T >
|
||||
void
|
||||
pull_coroutine< T >::control_block::destroy( control_block * cb) noexcept {
|
||||
boost::context::captured_context ctx = std::move( cb->ctx);
|
||||
boost::context::execution_context ctx = std::move( cb->ctx);
|
||||
// destroy control structure
|
||||
cb->~control_block();
|
||||
// destroy coroutine's stack
|
||||
@ -48,7 +48,7 @@ pull_coroutine< T >::control_block::control_block( context::preallocated palloc,
|
||||
ctx{ std::allocator_arg, palloc, salloc,
|
||||
std::move(
|
||||
std::bind(
|
||||
[this]( typename std::decay< Fn >::type & fn_, boost::context::captured_context ctx, void *) mutable {
|
||||
[this]( typename std::decay< Fn >::type & fn_, boost::context::execution_context ctx, void *) mutable {
|
||||
// create synthesized push_coroutine< T >
|
||||
typename push_coroutine< T >::control_block synthesized_cb{ this, ctx };
|
||||
push_coroutine< T > synthesized{ & synthesized_cb };
|
||||
@ -75,7 +75,7 @@ pull_coroutine< T >::control_block::control_block( context::preallocated palloc,
|
||||
std::placeholders::_2))},
|
||||
#else
|
||||
ctx{ std::allocator_arg, palloc, salloc,
|
||||
[this,fn_=std::forward< Fn >( fn)]( boost::context::captured_context ctx, void *) mutable {
|
||||
[this,fn_=std::forward< Fn >( fn)]( boost::context::execution_context ctx, void *) mutable {
|
||||
// create synthesized push_coroutine< T >
|
||||
typename push_coroutine< T >::control_block synthesized_cb{ this, ctx };
|
||||
push_coroutine< T > synthesized{ & synthesized_cb };
|
||||
@ -111,7 +111,7 @@ pull_coroutine< T >::control_block::control_block( context::preallocated palloc,
|
||||
|
||||
template< typename T >
|
||||
pull_coroutine< T >::control_block::control_block( typename push_coroutine< T >::control_block * cb,
|
||||
boost::context::captured_context & ctx_) noexcept :
|
||||
boost::context::execution_context & ctx_) noexcept :
|
||||
ctx{ std::move( ctx_) },
|
||||
other{ cb },
|
||||
state{ state_t::none },
|
||||
@ -180,7 +180,7 @@ pull_coroutine< T >::control_block::valid() const noexcept {
|
||||
template< typename T >
|
||||
void
|
||||
pull_coroutine< T & >::control_block::destroy( control_block * cb) noexcept {
|
||||
boost::context::captured_context ctx = std::move( cb->ctx);
|
||||
boost::context::execution_context ctx = std::move( cb->ctx);
|
||||
// destroy control structure
|
||||
cb->~control_block();
|
||||
// destroy coroutine's stack
|
||||
@ -195,7 +195,7 @@ pull_coroutine< T & >::control_block::control_block( context::preallocated pallo
|
||||
ctx{ std::allocator_arg, palloc, salloc,
|
||||
std::move(
|
||||
std::bind(
|
||||
[this]( typename std::decay< Fn >::type & fn_, boost::context::captured_context ctx, void *) mutable {
|
||||
[this]( typename std::decay< Fn >::type & fn_, boost::context::execution_context ctx, void *) mutable {
|
||||
// create synthesized push_coroutine< T >
|
||||
typename push_coroutine< T & >::control_block synthesized_cb{ this, ctx };
|
||||
push_coroutine< T & > synthesized{ & synthesized_cb };
|
||||
@ -222,7 +222,7 @@ pull_coroutine< T & >::control_block::control_block( context::preallocated pallo
|
||||
std::placeholders::_2))},
|
||||
#else
|
||||
ctx{ std::allocator_arg, palloc, salloc,
|
||||
[this,fn_=std::forward< Fn >( fn)]( boost::context::captured_context ctx, void *) mutable {
|
||||
[this,fn_=std::forward< Fn >( fn)]( boost::context::execution_context ctx, void *) mutable {
|
||||
// create synthesized push_coroutine< T >
|
||||
typename push_coroutine< T & >::control_block synthesized_cb{ this, ctx };
|
||||
push_coroutine< T & > synthesized{ & synthesized_cb };
|
||||
@ -257,7 +257,7 @@ pull_coroutine< T & >::control_block::control_block( context::preallocated pallo
|
||||
|
||||
template< typename T >
|
||||
pull_coroutine< T & >::control_block::control_block( typename push_coroutine< T & >::control_block * cb,
|
||||
boost::context::captured_context & ctx_) noexcept :
|
||||
boost::context::execution_context & ctx_) noexcept :
|
||||
ctx{ std::move( ctx_) },
|
||||
other{ cb },
|
||||
state{ state_t::none },
|
||||
@ -302,7 +302,7 @@ pull_coroutine< T & >::control_block::valid() const noexcept {
|
||||
inline
|
||||
void
|
||||
pull_coroutine< void >::control_block::destroy( control_block * cb) noexcept {
|
||||
boost::context::captured_context ctx = std::move( cb->ctx);
|
||||
boost::context::execution_context ctx = std::move( cb->ctx);
|
||||
// destroy control structure
|
||||
cb->~control_block();
|
||||
// destroy coroutine's stack
|
||||
@ -316,7 +316,7 @@ pull_coroutine< void >::control_block::control_block( context::preallocated pall
|
||||
ctx{ std::allocator_arg, palloc, salloc,
|
||||
std::move(
|
||||
std::bind(
|
||||
[this]( typename std::decay< Fn >::type & fn_, boost::context::captured_context ctx, void *) mutable {
|
||||
[this]( typename std::decay< Fn >::type & fn_, boost::context::execution_context ctx, void *) mutable {
|
||||
// create synthesized push_coroutine< T >
|
||||
typename push_coroutine< void >::control_block synthesized_cb{ this, ctx };
|
||||
push_coroutine< void > synthesized{ & synthesized_cb };
|
||||
@ -343,7 +343,7 @@ pull_coroutine< void >::control_block::control_block( context::preallocated pall
|
||||
std::placeholders::_2))},
|
||||
#else
|
||||
ctx{ std::allocator_arg, palloc, salloc,
|
||||
[this,fn_=std::forward< Fn >( fn)]( boost::context::captured_context ctx, void *) mutable {
|
||||
[this,fn_=std::forward< Fn >( fn)]( boost::context::execution_context ctx, void *) mutable {
|
||||
// create synthesized push_coroutine< T >
|
||||
typename push_coroutine< void >::control_block synthesized_cb{ this, ctx };
|
||||
push_coroutine< void > synthesized{ & synthesized_cb };
|
||||
@ -376,7 +376,7 @@ pull_coroutine< void >::control_block::control_block( context::preallocated pall
|
||||
|
||||
inline
|
||||
pull_coroutine< void >::control_block::control_block( push_coroutine< void >::control_block * cb,
|
||||
boost::context::captured_context & ctx_) noexcept :
|
||||
boost::context::execution_context & ctx_) noexcept :
|
||||
ctx{ std::move( ctx_) },
|
||||
other{ cb },
|
||||
state{ state_t::none },
|
@ -10,7 +10,7 @@
|
||||
#include <exception>
|
||||
|
||||
#include <boost/config.hpp>
|
||||
#include <boost/context/captured_context.hpp>
|
||||
#include <boost/context/execution_context.hpp>
|
||||
|
||||
#include <boost/coroutine2/detail/state.hpp>
|
||||
|
||||
@ -24,7 +24,7 @@ namespace detail {
|
||||
|
||||
template< typename T >
|
||||
struct push_coroutine< T >::control_block {
|
||||
boost::context::captured_context ctx;
|
||||
boost::context::execution_context ctx;
|
||||
typename pull_coroutine< T >::control_block * other;
|
||||
state_t state;
|
||||
std::exception_ptr except;
|
||||
@ -34,7 +34,7 @@ struct push_coroutine< T >::control_block {
|
||||
template< typename StackAllocator, typename Fn >
|
||||
control_block( context::preallocated, StackAllocator, Fn &&);
|
||||
|
||||
control_block( typename pull_coroutine< T >::control_block *, boost::context::captured_context &) noexcept;
|
||||
control_block( typename pull_coroutine< T >::control_block *, boost::context::execution_context &) noexcept;
|
||||
|
||||
control_block( control_block &) = delete;
|
||||
control_block & operator=( control_block &) = delete;
|
||||
@ -50,7 +50,7 @@ struct push_coroutine< T >::control_block {
|
||||
|
||||
template< typename T >
|
||||
struct push_coroutine< T & >::control_block {
|
||||
boost::context::captured_context ctx;
|
||||
boost::context::execution_context ctx;
|
||||
typename pull_coroutine< T & >::control_block * other;
|
||||
state_t state;
|
||||
std::exception_ptr except;
|
||||
@ -60,7 +60,7 @@ struct push_coroutine< T & >::control_block {
|
||||
template< typename StackAllocator, typename Fn >
|
||||
control_block( context::preallocated, StackAllocator, Fn &&);
|
||||
|
||||
control_block( typename pull_coroutine< T & >::control_block *, boost::context::captured_context &) noexcept;
|
||||
control_block( typename pull_coroutine< T & >::control_block *, boost::context::execution_context &) noexcept;
|
||||
|
||||
control_block( control_block &) = delete;
|
||||
control_block & operator=( control_block &) = delete;
|
||||
@ -73,7 +73,7 @@ struct push_coroutine< T & >::control_block {
|
||||
};
|
||||
|
||||
struct push_coroutine< void >::control_block {
|
||||
boost::context::captured_context ctx;
|
||||
boost::context::execution_context ctx;
|
||||
pull_coroutine< void >::control_block * other;
|
||||
state_t state;
|
||||
std::exception_ptr except;
|
||||
@ -83,7 +83,7 @@ struct push_coroutine< void >::control_block {
|
||||
template< typename StackAllocator, typename Fn >
|
||||
control_block( context::preallocated, StackAllocator, Fn &&);
|
||||
|
||||
control_block( pull_coroutine< void >::control_block *, boost::context::captured_context &) noexcept;
|
||||
control_block( pull_coroutine< void >::control_block *, boost::context::execution_context &) noexcept;
|
||||
|
||||
control_block( control_block &) = delete;
|
||||
control_block & operator=( control_block &) = delete;
|
@ -14,7 +14,7 @@
|
||||
#include <boost/assert.hpp>
|
||||
#include <boost/config.hpp>
|
||||
|
||||
#include <boost/context/captured_context.hpp>
|
||||
#include <boost/context/execution_context.hpp>
|
||||
|
||||
#include <boost/coroutine2/detail/config.hpp>
|
||||
#include <boost/coroutine2/detail/forced_unwind.hpp>
|
||||
@ -32,7 +32,7 @@ namespace detail {
|
||||
template< typename T >
|
||||
void
|
||||
push_coroutine< T >::control_block::destroy( control_block * cb) noexcept {
|
||||
boost::context::captured_context ctx = std::move( cb->ctx);
|
||||
boost::context::execution_context ctx = std::move( cb->ctx);
|
||||
// destroy control structure
|
||||
cb->~control_block();
|
||||
// destroy coroutine's stack
|
||||
@ -47,7 +47,7 @@ push_coroutine< T >::control_block::control_block( context::preallocated palloc,
|
||||
ctx{ std::allocator_arg, palloc, salloc,
|
||||
std::move(
|
||||
std::bind(
|
||||
[this]( typename std::decay< Fn >::type & fn_, boost::context::captured_context ctx, void * data) mutable {
|
||||
[this]( typename std::decay< Fn >::type & fn_, boost::context::execution_context ctx, void * data) mutable {
|
||||
// create synthesized pull_coroutine< T >
|
||||
typename pull_coroutine< T >::control_block synthesized_cb{ this, ctx };
|
||||
pull_coroutine< T > synthesized{ & synthesized_cb };
|
||||
@ -76,7 +76,7 @@ push_coroutine< T >::control_block::control_block( context::preallocated palloc,
|
||||
std::placeholders::_2))},
|
||||
#else
|
||||
ctx{ std::allocator_arg, palloc, salloc,
|
||||
[this,fn_=std::forward< Fn >( fn)]( boost::context::captured_context ctx, void * data) mutable {
|
||||
[this,fn_=std::forward< Fn >( fn)]( boost::context::execution_context ctx, void * data) mutable {
|
||||
// create synthesized pull_coroutine< T >
|
||||
typename pull_coroutine< T >::control_block synthesized_cb{ this, ctx };
|
||||
pull_coroutine< T > synthesized{ & synthesized_cb };
|
||||
@ -108,7 +108,7 @@ push_coroutine< T >::control_block::control_block( context::preallocated palloc,
|
||||
|
||||
template< typename T >
|
||||
push_coroutine< T >::control_block::control_block( typename pull_coroutine< T >::control_block * cb,
|
||||
boost::context::captured_context & ctx_) noexcept :
|
||||
boost::context::execution_context & ctx_) noexcept :
|
||||
ctx{ std::move( ctx_) },
|
||||
other{ cb },
|
||||
state{ state_t::none },
|
||||
@ -157,7 +157,7 @@ push_coroutine< T >::control_block::valid() const noexcept {
|
||||
template< typename T >
|
||||
void
|
||||
push_coroutine< T & >::control_block::destroy( control_block * cb) noexcept {
|
||||
boost::context::captured_context ctx = std::move( cb->ctx);
|
||||
boost::context::execution_context ctx = std::move( cb->ctx);
|
||||
// destroy control structure
|
||||
cb->~control_block();
|
||||
// destroy coroutine's stack
|
||||
@ -172,7 +172,7 @@ push_coroutine< T & >::control_block::control_block( context::preallocated pallo
|
||||
ctx{ std::allocator_arg, palloc, salloc,
|
||||
std::move(
|
||||
std::bind(
|
||||
[this]( typename std::decay< Fn >::type & fn_, boost::context::captured_context ctx, void * data) mutable {
|
||||
[this]( typename std::decay< Fn >::type & fn_, boost::context::execution_context ctx, void * data) mutable {
|
||||
// create synthesized pull_coroutine< T >
|
||||
typename pull_coroutine< T & >::control_block synthesized_cb{ this, ctx };
|
||||
pull_coroutine< T & > synthesized{ & synthesized_cb };
|
||||
@ -201,7 +201,7 @@ push_coroutine< T & >::control_block::control_block( context::preallocated pallo
|
||||
std::placeholders::_2))},
|
||||
#else
|
||||
ctx{ std::allocator_arg, palloc, salloc,
|
||||
[this,fn_=std::forward< Fn >( fn)]( boost::context::captured_context ctx, void * data) mutable {
|
||||
[this,fn_=std::forward< Fn >( fn)]( boost::context::execution_context ctx, void * data) mutable {
|
||||
// create synthesized pull_coroutine< T >
|
||||
typename pull_coroutine< T & >::control_block synthesized_cb{ this, ctx };
|
||||
pull_coroutine< T & > synthesized{ & synthesized_cb };
|
||||
@ -233,7 +233,7 @@ push_coroutine< T & >::control_block::control_block( context::preallocated pallo
|
||||
|
||||
template< typename T >
|
||||
push_coroutine< T & >::control_block::control_block( typename pull_coroutine< T & >::control_block * cb,
|
||||
boost::context::captured_context & ctx_) noexcept :
|
||||
boost::context::execution_context & ctx_) noexcept :
|
||||
ctx{ std::move( ctx_) },
|
||||
other{ cb },
|
||||
state{ state_t::none },
|
||||
@ -271,7 +271,7 @@ push_coroutine< T & >::control_block::valid() const noexcept {
|
||||
inline
|
||||
void
|
||||
push_coroutine< void >::control_block::destroy( control_block * cb) noexcept {
|
||||
boost::context::captured_context ctx = std::move( cb->ctx);
|
||||
boost::context::execution_context ctx = std::move( cb->ctx);
|
||||
// destroy control structure
|
||||
cb->~control_block();
|
||||
// destroy coroutine's stack
|
||||
@ -284,7 +284,7 @@ push_coroutine< void >::control_block::control_block( context::preallocated pall
|
||||
ctx{ std::allocator_arg, palloc, salloc,
|
||||
std::move(
|
||||
std::bind(
|
||||
[this]( typename std::decay< Fn >::type & fn_, boost::context::captured_context ctx, void *) mutable {
|
||||
[this]( typename std::decay< Fn >::type & fn_, boost::context::execution_context ctx, void *) mutable {
|
||||
// create synthesized pull_coroutine< T >
|
||||
typename pull_coroutine< void >::control_block synthesized_cb{ this, ctx };
|
||||
pull_coroutine< void > synthesized{ & synthesized_cb };
|
||||
@ -311,7 +311,7 @@ push_coroutine< void >::control_block::control_block( context::preallocated pall
|
||||
std::placeholders::_2))},
|
||||
#else
|
||||
ctx{ std::allocator_arg, palloc, salloc,
|
||||
[this,fn_=std::forward< Fn >( fn)]( boost::context::captured_context ctx, void *) mutable {
|
||||
[this,fn_=std::forward< Fn >( fn)]( boost::context::execution_context ctx, void *) mutable {
|
||||
// create synthesized pull_coroutine< T >
|
||||
typename pull_coroutine< void >::control_block synthesized_cb{ this, ctx};
|
||||
pull_coroutine< void > synthesized{ & synthesized_cb };
|
||||
@ -341,7 +341,7 @@ push_coroutine< void >::control_block::control_block( context::preallocated pall
|
||||
|
||||
inline
|
||||
push_coroutine< void >::control_block::control_block( pull_coroutine< void >::control_block * cb,
|
||||
boost::context::captured_context & ctx_) noexcept :
|
||||
boost::context::execution_context & ctx_) noexcept :
|
||||
ctx{ std::move( ctx_) },
|
||||
other{ cb },
|
||||
state{ state_t::none },
|
Loading…
x
Reference in New Issue
Block a user