Fixed bug in stopping the ThreadCreator when shutting down the ThreadService.

This commit is contained in:
wcrisman
2014-07-17 14:28:08 -07:00
parent 499a70091b
commit 3cf6011121

View File

@@ -146,10 +146,10 @@ public class ThreadService {
//Wait until the thread is told to run again//
try {
//Make sure we don't have a target.//
if((target = getTarget()) == null) {
while((target = getTarget()) == null) {
//Wait for the next run of this thread//
wait();
}//if//
}//while//
}//try//
catch(InterruptedException e) {
return;
@@ -283,9 +283,12 @@ private synchronized void _shutdown() {
//Stop the thread creator.//
if(threadCreator != null) {
threadCreator.stop();
synchronized(threadCreator) {
threadCreator.stop();
threadCreator.notifyAll();
}//synchronized//
threadCreator = null;
notifyAll();
}//if//
threadIterator = getThreadPool().iterator();