diff --git a/include/boost/fiber/context.hpp b/include/boost/fiber/context.hpp index ab9c7250..5cd6790a 100644 --- a/include/boost/fiber/context.hpp +++ b/include/boost/fiber/context.hpp @@ -441,6 +441,8 @@ public: void worker_unlink() noexcept; + void attach( context *); + void migrate( context *); friend void intrusive_ptr_add_ref( context * ctx) { diff --git a/src/context.cpp b/src/context.cpp index 3ee5d842..c5613c5b 100644 --- a/src/context.cpp +++ b/src/context.cpp @@ -437,6 +437,12 @@ context::wait_unlink() noexcept { wait_hook_.unlink(); } +void +context::attach( context * ctx) { + BOOST_ASSERT( nullptr != ctx); + scheduler_->attach_worker_context( ctx); +} + void context::migrate( context * ctx) { BOOST_ASSERT( nullptr != ctx);