aboutsummaryrefslogtreecommitdiff
path: root/src/cancel.cpp
diff options
context:
space:
mode:
authorBenoit Germain <benoit.germain@ubisoft.com>2024-06-14 17:00:01 +0200
committerBenoit Germain <benoit.germain@ubisoft.com>2024-06-14 17:00:01 +0200
commit7d65cec0385b6dcaf3346d3f862efb5eb07ad14a (patch)
tree230de536a854b62017c54d3dffdd147f68bda0e4 /src/cancel.cpp
parent28ffb99fe2d9a4df1c60d35a39de47992076167f (diff)
downloadlanes-7d65cec0385b6dcaf3346d3f862efb5eb07ad14a.tar.gz
lanes-7d65cec0385b6dcaf3346d3f862efb5eb07ad14a.tar.bz2
lanes-7d65cec0385b6dcaf3346d3f862efb5eb07ad14a.zip
Handle std::ignore cases that should not be ignored
Diffstat (limited to 'src/cancel.cpp')
-rw-r--r--src/cancel.cpp10
1 files changed, 5 insertions, 5 deletions
diff --git a/src/cancel.cpp b/src/cancel.cpp
index 4f04857..a62fa96 100644
--- a/src/cancel.cpp
+++ b/src/cancel.cpp
@@ -176,17 +176,17 @@ LUAG_FUNC(thread_cancel)
176 STACK_CHECK_START_REL(L_, 0); 176 STACK_CHECK_START_REL(L_, 0);
177 switch (_lane->cancel(_op, _hook_count, _until, _wake_lane)) { 177 switch (_lane->cancel(_op, _hook_count, _until, _wake_lane)) {
178 default: // should never happen unless we added a case and forgot to handle it 178 default: // should never happen unless we added a case and forgot to handle it
179 LUA_ASSERT(L_, false); 179 raise_luaL_error(L_, "should not get here!");
180 break; 180 break;
181 181
182 case CancelResult::Timeout: 182 case CancelResult::Timeout:
183 lua_pushboolean(L_, 0); // false 183 lua_pushboolean(L_, 0); // false
184 lua_pushstring(L_, "timeout"); // false "timeout" 184 lua_pushstring(L_, "timeout"); // false "timeout"
185 break; 185 break;
186 186
187 case CancelResult::Cancelled: 187 case CancelResult::Cancelled:
188 lua_pushboolean(L_, 1); // true 188 lua_pushboolean(L_, 1); // true
189 std::ignore = _lane->pushThreadStatus(L_); // true status 189 std::ignore = _lane->pushThreadStatus(L_); // true "<status>"
190 break; 190 break;
191 } 191 }
192 STACK_CHECK(L_, 2); 192 STACK_CHECK(L_, 2);