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

move this_thread::yield() into round_robin schedulers

This commit is contained in:
Oliver Kowalke
2013-12-16 17:38:04 +01:00
parent aa6f0b1bce
commit 2c9e034f0b
8 changed files with 21 additions and 31 deletions

View File

@@ -9,7 +9,6 @@
#include <algorithm>
#include <boost/assert.hpp>
#include <boost/thread/thread.hpp>
#include "boost/fiber/detail/scheduler.hpp"
#include "boost/fiber/interruption.hpp"
@@ -99,8 +98,7 @@ recursive_mutex::lock()
// wait until main-fiber gets notified
while ( ! n->is_ready() )
// run scheduler
if ( ! detail::scheduler::instance()->run() )
this_thread::yield();
detail::scheduler::instance()->run();
}
}
}