aboutsummaryrefslogtreecommitdiff
path: root/src/lane.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'src/lane.cpp')
-rw-r--r--src/lane.cpp7
1 files changed, 4 insertions, 3 deletions
diff --git a/src/lane.cpp b/src/lane.cpp
index 2bc3431..00f857e 100644
--- a/src/lane.cpp
+++ b/src/lane.cpp
@@ -945,9 +945,10 @@ CancelResult Lane::cancel(CancelOp const op_, std::chrono::time_point<std::chron
945 // lane_->thread.get_stop_source().request_stop(); 945 // lane_->thread.get_stop_source().request_stop();
946 } 946 }
947 if (wakeLane_ == WakeLane::Yes) { // wake the thread so that execution returns from any pending linda operation if desired 947 if (wakeLane_ == WakeLane::Yes) { // wake the thread so that execution returns from any pending linda operation if desired
948 std::condition_variable* const _waiting_on{ waiting_on }; 948 if (status.load(std::memory_order_acquire) == Lane::Waiting) { // waiting_on is updated under control of status acquire/release semantics
949 if (status.load(std::memory_order_acquire) == Lane::Waiting && _waiting_on != nullptr) { 949 if (std::condition_variable* const _waiting_on{ waiting_on }) {
950 _waiting_on->notify_all(); 950 _waiting_on->notify_all();
951 }
951 } 952 }
952 } 953 }
953 // wait until the lane stops working with its state (either Suspended or Done+) 954 // wait until the lane stops working with its state (either Suspended or Done+)