diff options
author | Andrey Lihatskiy <alihatskiy@productengine.com> | 2024-04-10 10:29:47 +0300 |
---|---|---|
committer | GitHub <noreply@github.com> | 2024-04-10 10:29:47 +0300 |
commit | 5118ba7adfc6f49f5b23694507dc7ceb8365b969 (patch) | |
tree | 4e499acfe5617682c5eca52998b5c10cdac8609a /indra/llcommon/llthread.cpp | |
parent | 16e638db975278f6018fe1e21ba1954b7f159149 (diff) | |
parent | 84dfe55810815e8c274044cea5c81aaed89a787f (diff) |
Merge pull request #1179 from secondlife/marchcat/y-merge
Release (Maint W) -> Maint YZ merge
Diffstat (limited to 'indra/llcommon/llthread.cpp')
-rw-r--r-- | indra/llcommon/llthread.cpp | 13 |
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 |