aboutsummaryrefslogtreecommitdiff
path: root/src/universe.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'src/universe.cpp')
-rw-r--r--src/universe.cpp6
1 files changed, 3 insertions, 3 deletions
diff --git a/src/universe.cpp b/src/universe.cpp
index 9ab1290..52aa368 100644
--- a/src/universe.cpp
+++ b/src/universe.cpp
@@ -368,14 +368,14 @@ void Universe::terminateFreeRunningLanes(lua_State* L_, lua_Duration shutdownTim
368int universe_gc(lua_State* L_) 368int universe_gc(lua_State* L_)
369{ 369{
370 lua_Duration const _shutdown_timeout{ lua_tonumber(L_, lua_upvalueindex(1)) }; 370 lua_Duration const _shutdown_timeout{ lua_tonumber(L_, lua_upvalueindex(1)) };
371 [[maybe_unused]] char const* const _op_string{ lua_tostring(L_, lua_upvalueindex(2)) }; 371 std::string_view const _op_string{ lua_tostringview(L_, lua_upvalueindex(2)) };
372 Universe* const _U{ lua_tofulluserdata<Universe>(L_, 1) }; 372 Universe* const _U{ lua_tofulluserdata<Universe>(L_, 1) };
373 _U->terminateFreeRunningLanes(L_, _shutdown_timeout, which_cancel_op(_op_string)); 373 _U->terminateFreeRunningLanes(L_, _shutdown_timeout, which_cancel_op(_op_string));
374 374
375 // no need to mutex-protect this as all threads in the universe are gone at that point 375 // no need to mutex-protect this as all threads in the universe are gone at that point
376 if (_U->timerLinda != nullptr) { // test in case some early internal error prevented Lanes from creating the deep timer 376 if (_U->timerLinda != nullptr) { // test in case some early internal error prevented Lanes from creating the deep timer
377 [[maybe_unused]] int const prev_ref_count{ _U->timerLinda->refcount.fetch_sub(1, std::memory_order_relaxed) }; 377 [[maybe_unused]] int const _prev_ref_count{ _U->timerLinda->refcount.fetch_sub(1, std::memory_order_relaxed) };
378 LUA_ASSERT(L_, prev_ref_count == 1); // this should be the last reference 378 LUA_ASSERT(L_, _prev_ref_count == 1); // this should be the last reference
379 DeepFactory::DeleteDeepObject(L_, _U->timerLinda); 379 DeepFactory::DeleteDeepObject(L_, _U->timerLinda);
380 _U->timerLinda = nullptr; 380 _U->timerLinda = nullptr;
381 } 381 }