From 4e6b625f6507697f719b55dfc9ff7ee6a0340d84 Mon Sep 17 00:00:00 2001 From: Oliver Kowalke Date: Tue, 20 Oct 2015 17:52:01 +0200 Subject: [PATCH] assert if source and traget context are euqal in resume_() --- src/scheduler.cpp | 6 +----- 1 file changed, 1 insertion(+), 5 deletions(-) diff --git a/src/scheduler.cpp b/src/scheduler.cpp index 168e1e73..81f35cd1 100644 --- a/src/scheduler.cpp +++ b/src/scheduler.cpp @@ -35,11 +35,7 @@ scheduler::resume_( context * active_ctx, context * ctx, std::function< void() > BOOST_ASSERT( this == active_ctx->get_scheduler() ); BOOST_ASSERT( this == ctx->get_scheduler() ); BOOST_ASSERT( active_ctx->get_scheduler() == ctx->get_scheduler() ); - // fiber next-to-run is same as current active-fiber - // this might happen in context of this_fiber::yield() - if ( active_ctx == ctx) { - return; - } + BOOST_ASSERT( active_ctx != ctx); // assign new fiber to active-fiber context::active( ctx); // resume active-fiber == ctx