git://source.jalview.org
/
jalview.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
need to own lock to notify
[jalview.git]
/
src
/
jalview
/
javascript
/
JSFunctionExec.java
diff --git
a/src/jalview/javascript/JSFunctionExec.java
b/src/jalview/javascript/JSFunctionExec.java
index
9c6f578
..
6ab0865
100644
(file)
--- a/
src/jalview/javascript/JSFunctionExec.java
+++ b/
src/jalview/javascript/JSFunctionExec.java
@@
-24,10
+24,16
@@
public class JSFunctionExec implements Runnable
{
if (jsExecQueue != null)
{
{
if (jsExecQueue != null)
{
- Vector q = jsExecQueue;
- jsExecQueue = null;
- q.removeAllElements();
- executor.notify();
+ synchronized (jsExecQueue)
+ {
+ Vector q = jsExecQueue;
+ q.removeAllElements();
+ jsExecQueue = null;
+ synchronized (q)
+ {
+ q.notifyAll();
+ }
+ }
executor = null;
}
}
executor = null;
}
}