mirror of
https://github.com/boostorg/fiber.git
synced 2026-02-20 02:32:19 +00:00
migrate context: scheduler must be different
This commit is contained in:
@@ -533,8 +533,10 @@ void
|
||||
context::migrate( context * ctx) noexcept {
|
||||
BOOST_ASSERT( nullptr != ctx);
|
||||
BOOST_ASSERT( context::active() != ctx);
|
||||
ctx->scheduler_->detach_worker_context( ctx);
|
||||
scheduler_->attach_worker_context( ctx);
|
||||
if ( scheduler_ != ctx->scheduler_) {
|
||||
ctx->scheduler_->detach_worker_context( ctx);
|
||||
scheduler_->attach_worker_context( ctx);
|
||||
}
|
||||
}
|
||||
|
||||
}}
|
||||
|
||||
Reference in New Issue
Block a user