mirror of
https://github.com/boostorg/fiber.git
synced 2026-02-18 14:02:18 +00:00
start dispatcher-context in dtor of scheduler
This commit is contained in:
@@ -109,10 +109,10 @@ scheduler::~scheduler() {
|
||||
// signal dispatcher-context termination
|
||||
shutdown_ = true;
|
||||
// resume pending fibers
|
||||
context * ctx = get_next_();
|
||||
if ( nullptr != ctx) {
|
||||
ctx->resume();
|
||||
}
|
||||
// by resuming dispatcher-context
|
||||
// (unlink it from ready-queuei before)
|
||||
dispatcher_ctx_->ready_unlink();
|
||||
dispatcher_ctx_->resume();
|
||||
// no context' in worker-queue
|
||||
std::unique_lock< detail::spinlock > lk( worker_splk_);
|
||||
BOOST_ASSERT( worker_queue_.empty() );
|
||||
|
||||
Reference in New Issue
Block a user