File tree Expand file tree Collapse file tree 1 file changed +8
-2
lines changed
src/ibmras/monitoring/agent/threads Expand file tree Collapse file tree 1 file changed +8
-2
lines changed Original file line number Diff line number Diff line change @@ -45,9 +45,15 @@ void WorkerThread::start() {
4545void WorkerThread::stop () {
4646 source->complete (NULL );
4747 running = false ;
48- stopped = true ;
48+
49+ // Issue 99: By setting stopped to true too early, ThreadPool
50+ // might intermittently destruct us while we're still in processLoop.
51+ // We've already set running=false, so processLoop will finish the
52+ // next chance it gets and only then will set stopped=true.
53+ // stopped = true;
54+
4955 semaphore.inc ();
50- IBMRAS_DEBUG_1 (debug, " Worker thread for %s stopped " , source->header .name );
56+ IBMRAS_DEBUG_1 (debug, " Worker thread for %s stopping " , source->header .name );
5157}
5258
5359void * WorkerThread::cleanUp (ibmras::common::port::ThreadData* data) {
You can’t perform that action at this time.
0 commit comments