aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--Rx/v2/src/rxcpp/schedulers/rx-newthread.hpp5
1 files changed, 3 insertions, 2 deletions
diff --git a/Rx/v2/src/rxcpp/schedulers/rx-newthread.hpp b/Rx/v2/src/rxcpp/schedulers/rx-newthread.hpp
index 5145e92..1500b25 100644
--- a/Rx/v2/src/rxcpp/schedulers/rx-newthread.hpp
+++ b/Rx/v2/src/rxcpp/schedulers/rx-newthread.hpp
@@ -109,8 +109,9 @@ private:
keepAlive->q.pop();
continue;
}
- if (clock_type::now() < peek.when) {
- keepAlive->wake.wait_until(guard, peek.when);
+ auto when = peek.when;
+ if (clock_type::now() < when) {
+ keepAlive->wake.wait_until(guard, when);
continue;
}
auto what = peek.what;