Make sure we assign name before mStatus

This commit is contained in:
Aleric Inglewood
2011-08-07 18:47:01 +02:00
parent 87070be7e3
commit 3d1863c1b5

View File

@@ -102,7 +102,7 @@ void *APR_THREAD_FUNC LLThread::staticRun(apr_thread_t *apr_threadp, void *datap
// Setting mStatus to STOPPED is done non-thread-safe, so it's
// possible that the thread is deleted by another thread at
// the moment it happens... therefore make a copy here.
volatile char const* name = threadp->mName.c_str();
char const* volatile name = threadp->mName.c_str();
// We're done with the run function, this thread is done executing now.
threadp->mStatus = STOPPED;