aboutsummaryrefslogtreecommitdiff
path: root/src/lane.cpp
diff options
context:
space:
mode:
authorBenoit Germain <benoit.germain@ubisoft.com>2025-02-05 12:27:02 +0100
committerBenoit Germain <benoit.germain@ubisoft.com>2025-02-05 12:27:02 +0100
commit05e4cce366cccf92ad88f80695efa548fae187de (patch)
tree3332753154ecd89a87d7fdd6a4f9383d1b66ed1f /src/lane.cpp
parent59ae58fd31d63c261372bd5a36765328583bc1b6 (diff)
downloadlanes-05e4cce366cccf92ad88f80695efa548fae187de.tar.gz
lanes-05e4cce366cccf92ad88f80695efa548fae187de.tar.bz2
lanes-05e4cce366cccf92ad88f80695efa548fae187de.zip
Minor internal code tweaks
* mark all eligible classes Final * new TableIndex strong type * buildfixes for HAVE_DEBUGSPEW() * overridden virtual destructors tagged as such
Diffstat (limited to 'src/lane.cpp')
-rw-r--r--src/lane.cpp4
1 files changed, 2 insertions, 2 deletions
diff --git a/src/lane.cpp b/src/lane.cpp
index 7664dd6..c3f2996 100644
--- a/src/lane.cpp
+++ b/src/lane.cpp
@@ -188,7 +188,7 @@ static LUAG_FUNC(lane_join)
188 break; 188 break;
189 189
190 default: 190 default:
191 DEBUGSPEW_CODE(DebugSpew(nullptr) << "Unknown Lane status: " << static_cast<int>(_lane->status) << std::endl); 191 DEBUGSPEW_CODE(DebugSpew(nullptr) << "Unknown Lane status: " << static_cast<int>(_lane->status.load(std::memory_order_relaxed)) << std::endl);
192 LUA_ASSERT(L_, false); 192 LUA_ASSERT(L_, false);
193 _ret = 0; 193 _ret = 0;
194 } 194 }
@@ -766,7 +766,7 @@ static void lane_main(Lane* const lane_)
766 // in case of error and if it exists, fetch stack trace from registry and push it 766 // in case of error and if it exists, fetch stack trace from registry and push it
767 lane_->nresults += PushStackTrace(_L, lane_->errorTraceLevel, _rc, StackIndex{ 1 }); // L: retvals|error [trace] 767 lane_->nresults += PushStackTrace(_L, lane_->errorTraceLevel, _rc, StackIndex{ 1 }); // L: retvals|error [trace]
768 768
769 DEBUGSPEW_CODE(DebugSpew(lane_->U) << "Lane " << _L << " body: " << GetErrcodeName(_rc) << " (" << (kCancelError.equals(_L, 1) ? "cancelled" : luaG_typename(_L, 1)) << ")" << std::endl); 769 DEBUGSPEW_CODE(DebugSpew(lane_->U) << "Lane " << _L << " body: " << GetErrcodeName(_rc) << " (" << (kCancelError.equals(_L, StackIndex{ 1 }) ? "cancelled" : luaG_typename(_L, StackIndex{ 1 })) << ")" << std::endl);
770 // Call finalizers, if the script has set them up. 770 // Call finalizers, if the script has set them up.
771 // If the lane is not a coroutine, there is only a regular state, so everything is the same whether we use S or L. 771 // If the lane is not a coroutine, there is only a regular state, so everything is the same whether we use S or L.
772 // If the lane is a coroutine, this has to be done from the master state (S), not the thread (L), because we can't lua_pcall in a thread state 772 // If the lane is a coroutine, this has to be done from the master state (S), not the thread (L), because we can't lua_pcall in a thread state