2
0
mirror of https://github.com/boostorg/fiber.git synced 2026-02-16 13:22:17 +00:00

add assertion in get_next_() ensures scheduler is set

This commit is contained in:
Oliver Kowalke
2015-10-11 08:44:06 +02:00
parent 950a1571bb
commit b859f8984a

View File

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