diff options
| author | Anchor Linden <anchor@lindenlab.com> | 2018-05-21 16:47:42 -0700 |
|---|---|---|
| committer | Anchor Linden <anchor@lindenlab.com> | 2018-05-21 16:47:42 -0700 |
| commit | 0fdbe7e34df55ac92302b4af38c42d03454d3bc1 (patch) | |
| tree | 038c6087299c9096ac7c6606ec45a8339eb0fd72 /indra/llcommon/llthread.cpp | |
| parent | 3bf89821d9c9777a0f24d89280bd7a7011a7a3df (diff) | |
| parent | c70119ebabc4b06e2b0db02aea8c56e01fbc666e (diff) | |
Merge
Diffstat (limited to 'indra/llcommon/llthread.cpp')
| -rw-r--r-- | indra/llcommon/llthread.cpp | 9 |
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; } |
