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:
@@ -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();
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user