Changes to LLThread

* Call a virtual terminated() that by default sets mStatus to STOPPED,
  instead of setting it to STOPPED directly, allowing to override
  the behavior of a LLThread derived class when the thread is about
  the exit.
* Make setQuitting() public, so it can also be used to hint to a
  thread that it should stop at its earliest convience.
This commit is contained in:
Aleric Inglewood
2013-01-26 18:53:57 +01:00
parent f6785c399d
commit 6dc4a60724
2 changed files with 7 additions and 3 deletions

View File

@@ -109,7 +109,7 @@ void *APR_THREAD_FUNC LLThread::staticRun(apr_thread_t *apr_threadp, void *datap
--sRunning;
// We're done with the run function, this thread is done executing now.
threadp->mStatus = STOPPED;
threadp->terminated();
// Only now print this info [doing that before setting mStatus
// to STOPPED makes it much more likely that another thread runs