2
0
mirror of https://github.com/boostorg/fiber.git synced 2026-02-18 14:02:18 +00:00

at scheduler destruction join dispatcher fiber

This commit is contained in:
Oliver Kowalke
2016-04-21 17:46:09 +02:00
parent 2fd3383dc6
commit 01db63c816

View File

@@ -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() );