need to own lock to notify
[jalview.git] / src / jalview / javascript / JSFunctionExec.java
index 47e4538..6ab0865 100644 (file)
@@ -29,7 +29,10 @@ public class JSFunctionExec implements Runnable
         Vector q = jsExecQueue;
         q.removeAllElements();
         jsExecQueue = null;
-        executor.notify();
+        synchronized (q)
+        {
+          q.notifyAll();
+        }
       }
       executor = null;
     }