summaryrefslogtreecommitdiff
path: root/indra/llcommon/llthread.cpp
diff options
context:
space:
mode:
authorNat Goodspeed <nat@lindenlab.com>2024-04-16 15:25:25 -0400
committerNat Goodspeed <nat@lindenlab.com>2024-04-16 15:25:25 -0400
commit78d985c154b0d71064b89891f5b2005e48c300ce (patch)
treec43bc6be58ec9b30f0f4dfaa6c027736fb331582 /indra/llcommon/llthread.cpp
parent6c2a278c3dbd9d0660be5e9f6ec1c756af7cb992 (diff)
parenta3cbd41543258818589dd0e368c68d2dc62b3398 (diff)
Merge branch 'main' into release/luau-scripting
Diffstat (limited to 'indra/llcommon/llthread.cpp')
-rw-r--r--indra/llcommon/llthread.cpp13
1 files changed, 7 insertions, 6 deletions
diff --git a/indra/llcommon/llthread.cpp b/indra/llcommon/llthread.cpp
index 4eaa05c335..cd4975d9d3 100644
--- a/indra/llcommon/llthread.cpp
+++ b/indra/llcommon/llthread.cpp
@@ -113,15 +113,16 @@ LL_COMMON_API bool on_main_thread()
return (LLThread::currentID() == main_thread());
}
-LL_COMMON_API void assert_main_thread()
+LL_COMMON_API bool assert_main_thread()
{
auto curr = LLThread::currentID();
auto main = main_thread();
- if (curr != main)
- {
- LL_WARNS() << "Illegal execution from thread id " << curr
- << " outside main thread " << main << LL_ENDL;
- }
+ if (curr == main)
+ return true;
+
+ LL_WARNS() << "Illegal execution from thread id " << curr
+ << " outside main thread " << main << LL_ENDL;
+ return false;
}
// this function has become moot