diff options
Diffstat (limited to 'src/cancel.cpp')
-rw-r--r-- | src/cancel.cpp | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/src/cancel.cpp b/src/cancel.cpp index 0f7a6af..07c316a 100644 --- a/src/cancel.cpp +++ b/src/cancel.cpp | |||
@@ -162,7 +162,7 @@ static CancelResult thread_cancel_hard(lua_State* L, Lane* lane_, double secs_, | |||
162 | (void) waitkill_timeout_; // unused | 162 | (void) waitkill_timeout_; // unused |
163 | (void) L; // unused | 163 | (void) L; // unused |
164 | #endif // THREADAPI == THREADAPI_PTHREAD | 164 | #endif // THREADAPI == THREADAPI_PTHREAD |
165 | lane_->mstatus = ThreadStatus::Killed; // mark 'gc' to wait for it | 165 | lane_->mstatus = Lane::Killed; // mark 'gc' to wait for it |
166 | // note that lane_->status value must remain to whatever it was at the time of the kill | 166 | // note that lane_->status value must remain to whatever it was at the time of the kill |
167 | // because we need to know if we can lua_close() the Lua State or not. | 167 | // because we need to know if we can lua_close() the Lua State or not. |
168 | result = CancelResult::Killed; | 168 | result = CancelResult::Killed; |
@@ -176,7 +176,7 @@ CancelResult thread_cancel(lua_State* L, Lane* lane_, CancelOp op_, double secs_ | |||
176 | { | 176 | { |
177 | // remember that lanes are not transferable: only one thread can cancel a lane, so no multithreading issue here | 177 | // remember that lanes are not transferable: only one thread can cancel a lane, so no multithreading issue here |
178 | // We can read 'lane_->status' without locks, but not wait for it (if Posix no PTHREAD_TIMEDJOIN) | 178 | // We can read 'lane_->status' without locks, but not wait for it (if Posix no PTHREAD_TIMEDJOIN) |
179 | if (lane_->mstatus == ThreadStatus::Killed) | 179 | if (lane_->mstatus == Lane::Killed) |
180 | { | 180 | { |
181 | return CancelResult::Killed; | 181 | return CancelResult::Killed; |
182 | } | 182 | } |