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

Diff of /classpath/java/lang/ThreadLocal.java

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

revision 1.4.2.3 by gnu_andrew, Sun Mar 13 14:38:40 2005 UTC revision 1.4.2.4 by tromey, Wed Apr 20 20:22:27 2005 UTC
# Line 1  Line 1 
1  /* ThreadLocal -- a variable with a unique value per thread  /* ThreadLocal -- a variable with a unique value per thread
2     Copyright (C) 2000, 2002, 2003, 2004 Free Software Foundation, Inc.     Copyright (C) 2000, 2002, 2003, 2004, 2005 Free Software Foundation, Inc.
3    
4  This file is part of GNU Classpath.  This file is part of GNU Classpath.
5    
# Line 85  import java.util.WeakHashMap; Line 85  import java.util.WeakHashMap;
85   * @author Mark Wielaard (mark@klomp.org)   * @author Mark Wielaard (mark@klomp.org)
86   * @author Eric Blake (ebb9@email.byu.edu)   * @author Eric Blake (ebb9@email.byu.edu)
87   * @since 1.2   * @since 1.2
88   * @status updated to 1.4   * @status updated to 1.5
89   */   */
90  public class ThreadLocal<T>  public class ThreadLocal<T>
91  {  {
# Line 169  public class ThreadLocal<T> Line 169  public class ThreadLocal<T>
169      // ever modify the map.      // ever modify the map.
170      map.put(key, value == null ? NULL : value);      map.put(key, value == null ? NULL : value);
171    }    }
172    
173      /**
174       * Removes the value associated with the ThreadLocal object for the
175       * currently executing Thread.
176       * @since 1.5
177       */
178      public void remove()
179      {
180        Map map = Thread.getThreadLocals();
181        map.remove(key);
182      }
183  }  }

Legend:
Removed from v.1.4.2.3  
changed lines
  Added in v.1.4.2.4

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