classpath
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Small patch for Thread.java


From: Archie Cobbs
Subject: Small patch for Thread.java
Date: Thu, 6 Mar 2003 15:40:44 -0800 (PST)

Hi,

Here's a patch that might help the next VM implementor after me... :-)

Thanks,
-Archie

__________________________________________________________________________
Archie Cobbs     *     Precision I/O      *     http://www.precisionio.com

--- /home/archie/classpath/classpath-0.05/vm/reference/java/lang/Thread.java    
Thu Oct  3 09:07:34 2002
+++ Thread.java Thu Mar  6 15:38:04 2003
@@ -279,7 +295,14 @@
   }
 
   /**
-   * Get the currently executing Thread.
+   * Get the currently executing Thread. In the situation that the
+   * currently running thread was created by native code and doesn't
+   * have an associated Thread object yet, currentThread() should set
+   * a flag and then attempt to construct and return a new Thread object.
+   * When currentThread() is invoked again recursively by the Thread
+   * constructor, the flag will already be set and in that second case
+   * currentThread() should just return null. currentThread() should not
+   * return a non-null value until after the constructor has returned.
    *
    * @return the currently executing Thread
    */




reply via email to

[Prev in Thread] Current Thread [Next in Thread]