Screenshot instructions:
Windows
Mac
Red Hat Linux
Ubuntu
Click URL instructions:
Right-click on ad, choose "Copy Link", then paste here →
(This may not be possible with some types of ads)
From: <skoehler@us...> - 2003-09-12 22:08:03
|
Update of /cvsroot/e-p-i-c/org.epic.perleditor/src/org/epic/perleditor/editors/util In directory sc8-pr-cvs1:/tmp/cvs-serv32259/src/org/epic/perleditor/editors/util Modified Files: StringReaderThread.java Log Message: - minor improvements Index: StringReaderThread.java =================================================================== RCS file: /cvsroot/e-p-i-c/org.epic.perleditor/src/org/epic/perleditor/editors/util/StringReaderThread.java,v retrieving revision 1.3 retrieving revision 1.4 diff -u -d -r1.3 -r1.4 --- StringReaderThread.java 8 Sep 2003 01:16:35 -0000 1.3 +++ StringReaderThread.java 12 Sep 2003 22:08:00 -0000 1.4 @@ -8,9 +8,9 @@ { private final Object lock = new Object(); - private Reader r; - private String s; - private IOException e; + private Reader reader; + private String result; + private IOException exception; public StringReaderThread() { @@ -27,12 +27,12 @@ { synchronized (this.lock) { - if (this.r!=null) + if (this.reader!=null) throw new RuntimeException("already in use"); - this.r = r; - this.s = null; - this.e = null; + this.reader = r; + this.result = null; + this.exception = null; this.lock.notify(); } @@ -42,13 +42,13 @@ { synchronized (this.lock) { - while (this.r!=null) + while (this.reader!=null) this.lock.wait(); - if (this.e!=null) - throw this.e; - if (this.s!=null) - return this.s; + if (this.exception!=null) + throw this.exception; + if (this.result!=null) + return this.result; throw new RuntimeException("no result"); } @@ -63,10 +63,10 @@ Reader r; synchronized (this.lock) { - while (this.r==null) + while (this.reader==null) this.lock.wait(); - r = this.r; + r = this.reader; } StringBuffer sb = new StringBuffer(); @@ -90,9 +90,9 @@ synchronized (this.lock) { - this.r = null; - this.s = sb.toString(); - this.e = e; + this.reader = null; + this.result = sb.toString(); + this.exception = e; this.lock.notifyAll(); } } |