diff --git a/src/scheduler.cpp b/src/scheduler.cpp index 59262c73..89e1037f 100644 --- a/src/scheduler.cpp +++ b/src/scheduler.cpp @@ -109,10 +109,8 @@ scheduler::~scheduler() { // signal dispatcher-context termination shutdown_ = true; // resume pending fibers - // by resuming dispatcher-context - // (unlink it from ready-queuei before) - dispatcher_ctx_->ready_unlink(); - dispatcher_ctx_->resume(); + // by joining dispatcher-context + dispatcher_ctx_->join(); // no context' in worker-queue std::unique_lock< detail::spinlock > lk( worker_splk_); BOOST_ASSERT( worker_queue_.empty() );