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:
@@ -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();
|
||||
|
||||
@@ -57,7 +57,7 @@ context::release() {
|
||||
splk_.unlock();
|
||||
|
||||
// notify all waiting fibers
|
||||
for ( context * f : wait_queue_) {
|
||||
for ( context * f : tmp) {
|
||||
do_signal( f);
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user