aboutsummaryrefslogtreecommitdiff
path: root/src/cancel.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'src/cancel.cpp')
-rw-r--r--src/cancel.cpp6
1 files changed, 3 insertions, 3 deletions
diff --git a/src/cancel.cpp b/src/cancel.cpp
index ed450f0..dd848a7 100644
--- a/src/cancel.cpp
+++ b/src/cancel.cpp
@@ -55,7 +55,7 @@ THE SOFTWARE.
55{ 55{
56 Lane* const lane{ kLanePointerRegKey.readLightUserDataValue<Lane>(L_) }; 56 Lane* const lane{ kLanePointerRegKey.readLightUserDataValue<Lane>(L_) };
57 // 'lane' is nullptr for the original main state (and no-one can cancel that) 57 // 'lane' is nullptr for the original main state (and no-one can cancel that)
58 return lane ? lane->cancel_request : CancelRequest::None; 58 return lane ? lane->cancelRequest : CancelRequest::None;
59} 59}
60 60
61// ################################################################################################# 61// #################################################################################################
@@ -109,7 +109,7 @@ LUAG_FUNC(cancel_test)
109 109
110[[nodiscard]] static CancelResult thread_cancel_soft(Lane* lane_, lua_Duration duration_, bool wakeLane_) 110[[nodiscard]] static CancelResult thread_cancel_soft(Lane* lane_, lua_Duration duration_, bool wakeLane_)
111{ 111{
112 lane_->cancel_request = CancelRequest::Soft; // it's now signaled to stop 112 lane_->cancelRequest = CancelRequest::Soft; // it's now signaled to stop
113 // negative timeout: we don't want to truly abort the lane, we just want it to react to cancel_test() on its own 113 // negative timeout: we don't want to truly abort the lane, we just want it to react to cancel_test() on its own
114 if (wakeLane_) { // wake the thread so that execution returns from any pending linda operation if desired 114 if (wakeLane_) { // wake the thread so that execution returns from any pending linda operation if desired
115 std::condition_variable* const waiting_on{ lane_->waiting_on }; 115 std::condition_variable* const waiting_on{ lane_->waiting_on };
@@ -125,7 +125,7 @@ LUAG_FUNC(cancel_test)
125 125
126[[nodiscard]] static CancelResult thread_cancel_hard(Lane* lane_, lua_Duration duration_, bool wakeLane_) 126[[nodiscard]] static CancelResult thread_cancel_hard(Lane* lane_, lua_Duration duration_, bool wakeLane_)
127{ 127{
128 lane_->cancel_request = CancelRequest::Hard; // it's now signaled to stop 128 lane_->cancelRequest = CancelRequest::Hard; // it's now signaled to stop
129 // lane_->thread.get_stop_source().request_stop(); 129 // lane_->thread.get_stop_source().request_stop();
130 if (wakeLane_) { // wake the thread so that execution returns from any pending linda operation if desired 130 if (wakeLane_) { // wake the thread so that execution returns from any pending linda operation if desired
131 std::condition_variable* waiting_on = lane_->waiting_on; 131 std::condition_variable* waiting_on = lane_->waiting_on;