Fixed bug in stopping the ThreadCreator when shutting down the ThreadService.
This commit is contained in:
@@ -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();
|
||||
|
||||
Reference in New Issue
Block a user