summaryrefslogtreecommitdiff
path: root/indra/llcommon/llthread.cpp
diff options
context:
space:
mode:
authorDave Parks <davep@lindenlab.com>2010-09-02 19:13:48 -0500
committerDave Parks <davep@lindenlab.com>2010-09-02 19:13:48 -0500
commit7399c39a2fef7ffaa232047bf2ea16ebef682506 (patch)
tree5dc1a16e2914e7312d2ed3a50bd5b7eca3280534 /indra/llcommon/llthread.cpp
parenta32920f627f900e1717959982d942bb54924d4c0 (diff)
Fix for crash when loading models (Don't hit UI from the main thread). Added asserts to LLFastTimer to verify main thread use only.
Diffstat (limited to 'indra/llcommon/llthread.cpp')
-rw-r--r--indra/llcommon/llthread.cpp9
1 files changed, 9 insertions, 0 deletions
diff --git a/indra/llcommon/llthread.cpp b/indra/llcommon/llthread.cpp
index 0385569a02..10cc409c6e 100644
--- a/indra/llcommon/llthread.cpp
+++ b/indra/llcommon/llthread.cpp
@@ -68,6 +68,15 @@ U32 ll_thread_local sThreadID = 0;
U32 LLThread::sIDIter = 0;
+void assert_main_thread()
+{
+ static U32 s_thread_id = LLThread::currentID();
+ if (LLThread::currentID() != s_thread_id)
+ {
+ llerrs << "Illegal execution outside main thread." << llendl;
+ }
+}
+
//
// Handed to the APR thread creation function
//