/[classpath]/classpath/java/lang/Thread.java
ViewVC logotype

Diff of /classpath/java/lang/Thread.java

Parent Directory Parent Directory | Revision Log Revision Log | View Patch Patch

revision 1.8.2.4 by gnu_andrew, Sun Jan 16 15:15:12 2005 UTC revision 1.8.2.5 by gnu_andrew, Sun Mar 13 14:38:40 2005 UTC
# Line 38  exception statement from your version. * Line 38  exception statement from your version. *
38    
39  package java.lang;  package java.lang;
40    
41    import java.util.Map;
42    import java.util.WeakHashMap;
43    
44  /* Written using "Java Class Libraries", 2nd edition, ISBN 0-201-31002-3  /* Written using "Java Class Libraries", 2nd edition, ISBN 0-201-31002-3
45   * "The Java Language Specification", ISBN 0-201-63451-1   * "The Java Language Specification", ISBN 0-201-63451-1
# Line 131  public class Thread implements Runnable Line 133  public class Thread implements Runnable
133    /** The next thread number to use. */    /** The next thread number to use. */
134    private static int numAnonymousThreadsCreated;    private static int numAnonymousThreadsCreated;
135    
136      /** Thread local storage. Package accessible for use by
137        * InheritableThreadLocal.
138        */
139      WeakHashMap locals;
140    
141    /**    /**
142     * Allocates a new <code>Thread</code> object. This constructor has     * Allocates a new <code>Thread</code> object. This constructor has
143     * the same effect as <code>Thread(null, null,</code>     * the same effect as <code>Thread(null, null,</code>
# Line 973  public class Thread implements Runnable Line 980  public class Thread implements Runnable
980    {    {
981      group.removeThread(this);      group.removeThread(this);
982      vmThread = null;      vmThread = null;
983        locals = null;
984      }
985    
986      /**
987       * Returns the map used by ThreadLocal to store the thread local values.
988       */
989      static Map getThreadLocals()
990      {
991        Thread thread = currentThread();
992        Map locals = thread.locals;
993        if (locals == null)
994          {
995            locals = thread.locals = new WeakHashMap();
996          }
997        return locals;
998    }    }
999    
1000    /**    /**

Legend:
Removed from v.1.8.2.4  
changed lines
  Added in v.1.8.2.5

savannah-hackers-public@gnu.org
ViewVC Help
Powered by ViewVC 1.1.26