From: jprocter Date: Mon, 17 Jan 2011 14:48:52 +0000 (+0000) Subject: need to own lock to notify X-Git-Tag: Release_2_7~295 X-Git-Url: http://source.jalview.org/gitweb/?a=commitdiff_plain;h=52e125bdf62f520d88a7aff8e6d9afe007dee15c;hp=0320d108d11d7cd02888a5faa1da548f35909c70;p=jalview.git need to own lock to notify --- diff --git a/src/jalview/javascript/JSFunctionExec.java b/src/jalview/javascript/JSFunctionExec.java index 9c6f578..47e4538 100644 --- a/src/jalview/javascript/JSFunctionExec.java +++ b/src/jalview/javascript/JSFunctionExec.java @@ -24,10 +24,13 @@ public class JSFunctionExec implements Runnable { if (jsExecQueue != null) { - Vector q = jsExecQueue; - jsExecQueue = null; - q.removeAllElements(); - executor.notify(); + synchronized (jsExecQueue) + { + Vector q = jsExecQueue; + q.removeAllElements(); + jsExecQueue = null; + executor.notify(); + } executor = null; } }