diff options
author | Benoit Germain <benoit.germain@ubisoft.com> | 2024-03-19 18:07:29 +0100 |
---|---|---|
committer | Benoit Germain <benoit.germain@ubisoft.com> | 2024-03-19 18:07:29 +0100 |
commit | f707ad2568e6bfb8f34496ce647d0fd153723448 (patch) | |
tree | 8902d4bc2e848128c1b656e11847b4b0145a6618 /src | |
parent | 278c362e4239bc65653e9d1309ff1f7e01f456ef (diff) | |
parent | 1d310e6ecb6e156598337612f16573d9cd284f5e (diff) | |
download | lanes-f707ad2568e6bfb8f34496ce647d0fd153723448.tar.gz lanes-f707ad2568e6bfb8f34496ce647d0fd153723448.tar.bz2 lanes-f707ad2568e6bfb8f34496ce647d0fd153723448.zip |
Merge branch 'C-Implementation'
Diffstat (limited to 'src')
-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 8558008..20c30f8 100644 --- a/src/cancel.cpp +++ b/src/cancel.cpp | |||
@@ -156,10 +156,10 @@ static cancel_result thread_cancel_hard( lua_State* L, Lane* s, double secs_, bo | |||
156 | #if THREADAPI == THREADAPI_PTHREAD | 156 | #if THREADAPI == THREADAPI_PTHREAD |
157 | // pthread: make sure the thread is really stopped! | 157 | // pthread: make sure the thread is really stopped! |
158 | // note that this may block forever if the lane doesn't call a cancellation point and pthread doesn't honor PTHREAD_CANCEL_ASYNCHRONOUS | 158 | // note that this may block forever if the lane doesn't call a cancellation point and pthread doesn't honor PTHREAD_CANCEL_ASYNCHRONOUS |
159 | result = THREAD_WAIT( &s->thread, waitkill_timeout_, &s->done_signal, &s->done_lock, &s->status); | 159 | result = THREAD_WAIT( &s->thread, waitkill_timeout_, &s->done_signal, &s->done_lock, &s->status) ? CR_Killed : CR_Timeout; |
160 | if( result == CR_Timeout) | 160 | if( result == CR_Timeout) |
161 | { | 161 | { |
162 | return luaL_error( L, "force-killed lane failed to terminate within %f second%s", waitkill_timeout_, waitkill_timeout_ > 1 ? "s" : ""); | 162 | (void) luaL_error( L, "force-killed lane failed to terminate within %f second%s", waitkill_timeout_, waitkill_timeout_ > 1 ? "s" : ""); |
163 | } | 163 | } |
164 | #else | 164 | #else |
165 | (void) waitkill_timeout_; // unused | 165 | (void) waitkill_timeout_; // unused |