harmony-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From apetre...@apache.org
Subject svn commit: r482357 - /harmony/enhanced/drlvm/trunk/vm/vmcore/src/kernel_classes/javasrc/java/lang/Thread.java
Date Mon, 04 Dec 2006 21:01:39 GMT
Author: apetrenko
Date: Mon Dec  4 13:01:37 2006
New Revision: 482357

URL: http://svn.apache.org/viewvc?view=rev&rev=482357
Log:
Patch for HARMONY-2219 "[drlvm][thread] fix Thread.start() waiting to prevent losing interruption"

Modified:
    harmony/enhanced/drlvm/trunk/vm/vmcore/src/kernel_classes/javasrc/java/lang/Thread.java

Modified: harmony/enhanced/drlvm/trunk/vm/vmcore/src/kernel_classes/javasrc/java/lang/Thread.java
URL: http://svn.apache.org/viewvc/harmony/enhanced/drlvm/trunk/vm/vmcore/src/kernel_classes/javasrc/java/lang/Thread.java?view=diff&rev=482357&r1=482356&r2=482357
==============================================================================
--- harmony/enhanced/drlvm/trunk/vm/vmcore/src/kernel_classes/javasrc/java/lang/Thread.java
(original)
+++ harmony/enhanced/drlvm/trunk/vm/vmcore/src/kernel_classes/javasrc/java/lang/Thread.java
Mon Dec  4 13:01:37 2006
@@ -740,10 +740,17 @@
                 throw new OutOfMemoryError("Failed to create new thread");
             } 
             
+            boolean interrupted = false;
             while(!this.started) {
                 try {
                     lock.wait();
-                } catch (InterruptedException e) {/* continue waiting*/}
+                } catch (InterruptedException e) {
+                    interrupted = true;
+                }
+            }
+
+            if (interrupted) {
+                Thread.currentThread().interrupt();
             }
         }
     }



Mime
View raw message