2
0
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:
Oliver Kowalke
2015-10-21 15:25:12 +02:00
parent 4e6b625f65
commit f743b63bc0
3 changed files with 5 additions and 15 deletions

View File

@@ -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