From b859f8984ace23cc93a0959ceb68ed2ebfef7e2a Mon Sep 17 00:00:00 2001 From: Oliver Kowalke Date: Sun, 11 Oct 2015 08:44:06 +0200 Subject: [PATCH] add assertion in get_next_() ensures scheduler is set --- src/scheduler.cpp | 1 + 1 file changed, 1 insertion(+) diff --git a/src/scheduler.cpp b/src/scheduler.cpp index a0cf7453..0ee3ac8d 100644 --- a/src/scheduler.cpp +++ b/src/scheduler.cpp @@ -57,6 +57,7 @@ scheduler::resume_( context * active_ctx, context * ctx) { context * scheduler::get_next_() noexcept { context * ctx = sched_algo_->pick_next(); + BOOST_ASSERT( nullptr == ctx || this == ctx->get_scheduler() ); if ( nullptr != ctx && ! ctx->worker_is_linked() && ! ctx->is_main_context() &&