From 52e125bdf62f520d88a7aff8e6d9afe007dee15c Mon Sep 17 00:00:00 2001 From: jprocter Date: Mon, 17 Jan 2011 14:48:52 +0000 Subject: [PATCH] need to own lock to notify --- src/jalview/javascript/JSFunctionExec.java | 11 +++++++---- 1 file changed, 7 insertions(+), 4 deletions(-) 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; } } -- 1.7.10.2