lucene-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Michael McCandless (JIRA)" <>
Subject [jira] Commented: (LUCENE-2017) CloseableThreadLocal is now obsolete
Date Thu, 29 Oct 2009 17:57:59 GMT


Michael McCandless commented on LUCENE-2017:

I don't think using remove() is sufficient -- it only removes the
calling thread's entry, whereas we want all entries for any thread
that stored something into the ThreadLocal, to be eligible for GC when
close is called.

The problem is a live thread is slow(ish) to free its objects in a
ThreadLocal instance even when the ThreadLocal instance is GC'd.  The
close method works around this.

> CloseableThreadLocal is now obsolete
> ------------------------------------
>                 Key: LUCENE-2017
>                 URL:
>             Project: Lucene - Java
>          Issue Type: Improvement
>    Affects Versions: 3.0
>            Reporter: C├ędrik LIME
>         Attachments: CloseableThreadLocal.patch
> Since Lucene 3 depends on Java 5, we can use ThreadLocal#remove() to take care or resource

This message is automatically generated by JIRA.
You can reply to this email to add a comment to the issue online.

To unsubscribe, e-mail:
For additional commands, e-mail:

View raw message