2002/07/20 04:07:26
authormegacz <megacz@xwt.org>
Fri, 30 Jan 2004 06:49:23 +0000 (06:49 +0000)
committermegacz <megacz@xwt.org>
Fri, 30 Jan 2004 06:49:23 +0000 (06:49 +0000)
darcs-hash:20040130064923-2ba56-608df83e8f16ce3393474e260e87df99163046a5.gz

CHANGES
src/org/xwt/TinySSL.java

diff --git a/CHANGES b/CHANGES
index e0eb78b..d966bad 100644 (file)
--- a/CHANGES
+++ b/CHANGES
 
 18-Jul megacz HTTP.java: Basic Proxy-Authorization support
 
-19-Jul megacz POSIX.java: font fix
\ No newline at end of file
+19-Jul megacz POSIX.java: font fix
+
+19-Jul megacz TinySSL.java: workaround for a GCJ bug
\ No newline at end of file
index d036d33..637e41c 100644 (file)
@@ -1479,7 +1479,15 @@ public class TinySSL extends Socket {
         volatile boolean stop = false;
         byte counter = 0;
         entropySpinner() { start(); }
-        public void run() { while (!stop) counter++; }
+        public void run() {
+            while (true) {
+                // without this synchronization, GCJ will over-optimize this loop into an infinite loop. Argh.
+                synchronized(this) {
+                    counter++;
+                    if (stop) return;
+                }
+            }
+        }
     }
     
     static {