mirror of
https://github.com/boostorg/fiber.git
synced 2026-02-20 02:32:19 +00:00
replace context::attach()/detach() by context::migrate()
This commit is contained in:
@@ -438,19 +438,13 @@ context::wait_unlink() noexcept {
|
||||
}
|
||||
|
||||
void
|
||||
context::attach( context * ctx) {
|
||||
context::migrate( context * ctx) {
|
||||
BOOST_ASSERT( nullptr != ctx);
|
||||
BOOST_ASSERT( context::active() != ctx);
|
||||
ctx->scheduler_->detach_worker_context( ctx);
|
||||
scheduler_->attach_worker_context( ctx);
|
||||
}
|
||||
|
||||
void
|
||||
context::detach( context * ctx) {
|
||||
BOOST_ASSERT( nullptr != ctx);
|
||||
BOOST_ASSERT( scheduler_ == ctx->scheduler_);
|
||||
scheduler_->detach_worker_context( ctx);
|
||||
ctx->scheduler_ = nullptr;
|
||||
}
|
||||
|
||||
}}
|
||||
|
||||
#ifdef BOOST_HAS_ABI_HEADERS
|
||||
|
||||
Reference in New Issue
Block a user