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

assert if source and traget context are euqal in resume_()

This commit is contained in:
Oliver Kowalke
2015-10-20 17:52:01 +02:00
parent ee2fc59ca1
commit 4e6b625f65

View File

@@ -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