diff --git a/include/boost/coroutine2/detail/pull_control_block_cc.ipp b/include/boost/coroutine2/detail/pull_control_block_cc.ipp index f511e29..fd7d8ce 100644 --- a/include/boost/coroutine2/detail/pull_control_block_cc.ipp +++ b/include/boost/coroutine2/detail/pull_control_block_cc.ipp @@ -35,10 +35,10 @@ template< typename T > void pull_coroutine< T >::control_block::destroy( control_block * cb) noexcept { boost::context::fiber c = std::move( cb->c); - // destroy control structure - cb->~control_block(); // destroy coroutine's stack cb->state |= state_t::destroy; + // destroy control structure + cb->~control_block(); } template< typename T > @@ -191,10 +191,10 @@ template< typename T > void pull_coroutine< T & >::control_block::destroy( control_block * cb) noexcept { boost::context::fiber c = std::move( cb->c); - // destroy control structure - cb->~control_block(); // destroy coroutine's stack cb->state |= state_t::destroy; + // destroy control structure + cb->~control_block(); } template< typename T > @@ -324,10 +324,10 @@ inline void pull_coroutine< void >::control_block::destroy( control_block * cb) noexcept { boost::context::fiber c = std::move( cb->c); - // destroy control structure - cb->~control_block(); // destroy coroutine's stack cb->state |= state_t::destroy; + // destroy control structure + cb->~control_block(); } template< typename StackAllocator, typename Fn > diff --git a/include/boost/coroutine2/detail/push_control_block_cc.ipp b/include/boost/coroutine2/detail/push_control_block_cc.ipp index 695dc88..dbaaed2 100644 --- a/include/boost/coroutine2/detail/push_control_block_cc.ipp +++ b/include/boost/coroutine2/detail/push_control_block_cc.ipp @@ -34,10 +34,10 @@ template< typename T > void push_coroutine< T >::control_block::destroy( control_block * cb) noexcept { boost::context::fiber c = std::move( cb->c); - // destroy control structure - cb->~control_block(); // destroy coroutine's stack cb->state |= state_t::destroy; + // destroy control structure + cb->~control_block(); } template< typename T > @@ -165,10 +165,10 @@ template< typename T > void push_coroutine< T & >::control_block::destroy( control_block * cb) noexcept { boost::context::fiber c = std::move( cb->c); - // destroy control structure - cb->~control_block(); // destroy coroutine's stack cb->state |= state_t::destroy; + // destroy control structure + cb->~control_block(); } template< typename T > @@ -285,10 +285,10 @@ inline void push_coroutine< void >::control_block::destroy( control_block * cb) noexcept { boost::context::fiber c = std::move( cb->c); - // destroy control structure - cb->~control_block(); // destroy coroutine's stack cb->state |= state_t::destroy; + // destroy control structure + cb->~control_block(); } template< typename StackAllocator, typename Fn >