diff --git a/indra/llcommon/llthread.cpp b/indra/llcommon/llthread.cpp index cf7768c67b8cf7de912102467a9df2bd35c8311d..fd1f8ee0960eae3ded84738a1ff6c2af994c27eb 100755 --- a/indra/llcommon/llthread.cpp +++ b/indra/llcommon/llthread.cpp @@ -143,12 +143,13 @@ 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. - 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 + threadp->mStatus = STOPPED; + return NULL; }