I wrote:
> I'd like to propose a different way to implement ThreadLocal.
> The patch is attached.
I realised that my new version would "leak" the ThreadLocal objects, so
I've attached a new version of the patch that uses a WeakHashMap in
Thread to store the locals.
I liked the previous patch bet
Hi,
I'd like to propose a different way to implement ThreadLocal. The patch
is attached. It trades using WeakHashMaps for one additional field in
Thread, which I think is a good trade. It is also completely lock free.
Note that it also fixes a bug in InheritableThreadLocal:
-local