summaryrefslogtreecommitdiff
path: root/indra/llcommon/llthread.cpp
diff options
context:
space:
mode:
authorAndrey Lihatskiy <andreylproductengine@lindenlab.com>2018-06-22 12:55:19 +0300
committerAndrey Lihatskiy <andreylproductengine@lindenlab.com>2018-06-22 12:55:19 +0300
commit5f432147e373c3223ac06797ecff147d447ed79f (patch)
tree942f163ad33ad3997aee3000cae321f5f693ad57 /indra/llcommon/llthread.cpp
parent99d9befb629c97f7c778c8a9ddfb9d0060d54de9 (diff)
parentdc07de2f4a4c49d1877bf743b6f0d209392f6eb6 (diff)
Merged lindenlab/viewer-release into default
Diffstat (limited to 'indra/llcommon/llthread.cpp')
-rw-r--r--indra/llcommon/llthread.cpp9
1 files changed, 6 insertions, 3 deletions
diff --git a/indra/llcommon/llthread.cpp b/indra/llcommon/llthread.cpp
index 32e8ea9682..1f4aa9b3a6 100644
--- a/indra/llcommon/llthread.cpp
+++ b/indra/llcommon/llthread.cpp
@@ -152,13 +152,16 @@ void *APR_THREAD_FUNC LLThread::staticRun(apr_thread_t *apr_threadp, void *datap
//LL_INFOS() << "LLThread::staticRun() Exiting: " << threadp->mName << LL_ENDL;
- // We're done with the run function, this thread is done executing now.
- //NB: we are using this flag to sync across threads...we really need memory barriers here
- threadp->mStatus = STOPPED;
delete threadp->mRecorder;
threadp->mRecorder = NULL;
+ // We're done with the run function, this thread is done executing now.
+ //NB: we are using this flag to sync across threads...we really need memory barriers here
+ // Todo: add LLMutex per thread instead of flag?
+ // We are using "while (mStatus != STOPPED) {ms_sleep();}" everywhere.
+ threadp->mStatus = STOPPED;
+
return NULL;
}