diff options
Diffstat (limited to 'src/cancel.h')
-rw-r--r-- | src/cancel.h | 18 |
1 files changed, 9 insertions, 9 deletions
diff --git a/src/cancel.h b/src/cancel.h index be4d781..9a20774 100644 --- a/src/cancel.h +++ b/src/cancel.h | |||
@@ -20,18 +20,18 @@ struct Lane; // forward | |||
20 | /* | 20 | /* |
21 | * Lane cancellation request modes | 21 | * Lane cancellation request modes |
22 | */ | 22 | */ |
23 | enum e_cancel_request | 23 | enum class CancelRequest |
24 | { | 24 | { |
25 | CANCEL_NONE, // no pending cancel request | 25 | None, // no pending cancel request |
26 | CANCEL_SOFT, // user wants the lane to cancel itself manually on cancel_test() | 26 | Soft, // user wants the lane to cancel itself manually on cancel_test() |
27 | CANCEL_HARD // user wants the lane to be interrupted (meaning code won't return from those functions) from inside linda:send/receive calls | 27 | Hard // user wants the lane to be interrupted (meaning code won't return from those functions) from inside linda:send/receive calls |
28 | }; | 28 | }; |
29 | 29 | ||
30 | enum cancel_result | 30 | enum class CancelResult |
31 | { | 31 | { |
32 | CR_Timeout, | 32 | Timeout, |
33 | CR_Cancelled, | 33 | Cancelled, |
34 | CR_Killed | 34 | Killed |
35 | }; | 35 | }; |
36 | 36 | ||
37 | enum CancelOp | 37 | enum CancelOp |
@@ -51,7 +51,7 @@ static constexpr UniqueKey CANCEL_ERROR{ 0xe97d41626cc97577ull }; // 'cancel_err | |||
51 | // crc64/we of string "CANCEL_TEST_KEY" generated at http://www.nitrxgen.net/hashgen/ | 51 | // crc64/we of string "CANCEL_TEST_KEY" generated at http://www.nitrxgen.net/hashgen/ |
52 | static constexpr UniqueKey CANCEL_TEST_KEY{ 0xe66f5960c57d133aull }; // used as registry key | 52 | static constexpr UniqueKey CANCEL_TEST_KEY{ 0xe66f5960c57d133aull }; // used as registry key |
53 | 53 | ||
54 | cancel_result thread_cancel( lua_State* L, Lane* s, CancelOp op_, double secs_, bool force_, double waitkill_timeout_); | 54 | CancelResult thread_cancel(lua_State* L, Lane* s, CancelOp op_, double secs_, bool force_, double waitkill_timeout_); |
55 | 55 | ||
56 | static inline int cancel_error( lua_State* L) | 56 | static inline int cancel_error( lua_State* L) |
57 | { | 57 | { |