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

fix join(), this_fiber::sleep_until()

This commit is contained in:
Oliver Kowalke
2015-09-10 20:42:28 +02:00
parent 4764c1184c
commit ebd147c08d
2 changed files with 2 additions and 4 deletions

View File

@@ -39,9 +39,7 @@ void yield() {
template< typename Clock, typename Duration >
void sleep_until( std::chrono::time_point< Clock, Duration > const& sleep_time) {
fibers::detail::spinlock splk;
std::unique_lock< fibers::detail::spinlock > lk( splk);
fibers::context::active()->do_wait_until( sleep_time, lk);
fibers::context::active()->do_wait_until( sleep_time);
// check if fiber was interrupted
interruption_point();

View File

@@ -57,7 +57,7 @@ context::release() {
splk_.unlock();
// notify all waiting fibers
for ( context * f : wait_queue_) {
for ( context * f : tmp) {
do_signal( f);
}