You are viewing a plain text version of this content. The canonical link for it is here.
Posted to batik-commits@xmlgraphics.apache.org by de...@apache.org on 2005/06/08 13:16:30 UTC
cvs commit: xml-batik/sources/org/apache/batik/util RunnableQueue.java
deweese 2005/06/08 04:16:30
Modified: sources/org/apache/batik/util RunnableQueue.java
Log:
Potential fix for InterruptedException in RunnableQueue.
Revision Changes Path
1.22 +9 -6 xml-batik/sources/org/apache/batik/util/RunnableQueue.java
Index: RunnableQueue.java
===================================================================
RCS file: /home/cvs/xml-batik/sources/org/apache/batik/util/RunnableQueue.java,v
retrieving revision 1.21
retrieving revision 1.22
diff -u -r1.21 -r1.22
--- RunnableQueue.java 23 Feb 2005 11:05:54 -0000 1.21
+++ RunnableQueue.java 8 Jun 2005 11:16:30 -0000 1.22
@@ -208,7 +208,6 @@
l.unlock();
runnableInvoked(rable);
}
- } catch (InterruptedException e) {
} finally {
synchronized (this) {
runnableQueueThread = null;
@@ -568,7 +567,7 @@
* unlock link and notify locker.
* Basic implementation does nothing.
*/
- public void unlock() throws InterruptedException { return; }
+ public void unlock() { return; }
}
/**
@@ -607,11 +606,15 @@
/**
* unlocks this link.
*/
- public synchronized void unlock() throws InterruptedException {
+ public synchronized void unlock() {
while (!locked) {
- // Wait until lock is called...
- wait();
+ try {
+ wait(); // Wait until lock is called...
+ } catch (InterruptedException ie) {
+ // Loop again...
+ }
}
+ locked = false;
// Wake the locking thread...
notify();
}