Commits

Anonymous committed 2187488

QUARTZ-774 : Possible hang in SimpleThreadPool.shutdown(true)

git-svn-id: http://svn.opensymphony.com/svn/quartz/trunk@92869f7d36a-ea1c-0410-88ea-9fd03e4c9665

Comments (0)

Files changed (1)

src/java/org/quartz/simpl/SimpleThreadPool.java

         }
     }
 
+    protected void clearFromBusyWorkersList(WorkerThread wt) {
+        synchronized(nextRunnableLock) {
+            busyWorkers.remove(wt);
+            nextRunnableLock.notifyAll();
+        }
+    }
+
     /*
      * ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
      * 
                         synchronized(this) {
                         	run = false;
                         }
+                        clearFromBusyWorkersList(this);
                     } else if(ran) {
                         ran = false;
                         makeAvailable(this);