classpath-patches
[Top][All Lists]
Advanced

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

[cp-patches] FYI: Using a WeakIdentityHashMap for thread locals


From: Jeroen Frijters
Subject: [cp-patches] FYI: Using a WeakIdentityHashMap for thread locals
Date: Fri, 6 Jan 2006 16:07:07 +0100

address@hidden wrote:
> >>>>> "Jeroen" == Jeroen Frijters <address@hidden> writes:
> 
> Jeroen> I propose the attached change to the handling of 
> thread locals. This
> Jeroen> fixes bug #24858 and makes the code slightly more 
> obvious (at the cost
> Jeroen> of introducing the new class WeakIdentityHashMap).
> 
> Jeroen> Comments?
> 
> IMO it is fine.

Thanks for reviewing. I've committed the patch.

Regards,
Jeroen

2006-01-06  Jeroen Frijters  <address@hidden>

        PR classpath/24858
        * gnu/java/util/WeakIdentityHashMap.java: New file.
        * java/lang/InheritableThreadLocal.java
        (newChildThread): Modified to remove key indirection.
        * java/lang/Thread.java
        (locals): Changed type to WeakIdentityHashMap.
        (getThreadLocals): Instantiate WeakIdentityHashMap instead of
        WeakHashMap.
        * java/lang/ThreadLocal.java
        (key, Key): Removed.
        (get, set): Changed to use "this" instead of "key".

Attachment: threadlocal.patch.txt
Description: threadlocal.patch.txt

Attachment: WeakIdentityHashMap.java
Description: WeakIdentityHashMap.java


reply via email to

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