aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorKonstantin Munichev <toobwn@gmail.com>2019-04-26 16:12:41 +0300
committerKirk Shoop <kirk.shoop@gmail.com>2019-04-26 13:24:08 -0700
commitf38fb8e3c30b01b07c57e08039b2942f1685224d (patch)
tree04a0a1724dc1e91484fc4c74496d7b7bef09af16
parent0efd9a48edffc407d8a7ec81c83cd3083d922799 (diff)
downloadplatform_external_Reactive-Extensions_RxCpp-f38fb8e3c30b01b07c57e08039b2942f1685224d.tar.gz
platform_external_Reactive-Extensions_RxCpp-f38fb8e3c30b01b07c57e08039b2942f1685224d.tar.bz2
platform_external_Reactive-Extensions_RxCpp-f38fb8e3c30b01b07c57e08039b2942f1685224d.zip
Fix address sanitizer issue in new_worker
Signed-off-by: Konstantin Munichev <toobwn@gmail.com>
-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;