et, ThreadLocal is very convenient for avoiding
synchronization.
Does anyone have any ideas on how to solve this w/o
falling
back to "normal" synchronization?
Mike
Begin forwarded message:
From: "Yonik Seeley" <[EMAIL PROTECTED]>
Date: July 7, 2008 3:30:28 PM EDT
To: [EMAI
gt; The instance ThreadLocals (and what the refer to) will be GC'd
>>>>>>>>>> when the containing Object is GC'd.
>>>>>>>>>>
>>>>>>>>>> There IS NO MEMORY LEAK in ThreadLocal. If the ThreadLocal
>>>>>>
e ThreadLocal is
holding strong references.
Yet, ThreadLocal is very convenient for avoiding
synchronization.
Does anyone have any ideas on how to solve this w/o
falling
back to "normal" synchronization?
Mike
Begin forwarded message:
From: "Yonik Seeley" <[EMAIL PROTECTED]>
endent of the rest of the code(no
>>>>>>>>> dependencies).Otherwise it can get pretty tricky(memory leaks,
>>>>>>>>> classloader problems) after awhile.
>>>>>>>>>
>>>>>>>>> It is pretty convenie
>>>>>>>> as you release the object within a try {} finall {} block or
>>>>>>>>> store objects which are independent of the rest of the code(no
>>>>>>>>> dependencies).Otherwise it can get pretty tricky(memory leaks,
>>>>>>>&g
olve this w/o falling
back to "normal" synchronization?
Mike
Begin forwarded message:
From: "Yonik Seeley" <[EMAIL PROTECTED]>
Date: July 7, 2008 3:30:28 PM EDT
To: [EMAIL PROTECTED]
Subject: Re: ThreadLocal in SegmentReader
Reply-To: [EMAIL PROTECTED]
On Mon, Jul 7, 200
ell ... SegmentReader uses ThreadLocal to hold a thread-
>>>>>>>>> private instance of TermVectorsReader, to avoid synchronizing
>>>>>>>>> per-document when loading term vectors.
>>>>>>>>>
>>>>>>
strong references.
Yet, ThreadLocal is very convenient for avoiding
synchronization.
Does anyone have any ideas on how to solve this w/o falling
back to "normal" synchronization?
Mike
Begin forwarded message:
From: "Yonik Seeley" <[EMAIL PROTECTED]>
Date: July 7,
uses a
>>>>>>> HashMap, which we'd have to synchronize on when getting the per-
>>>>>>> thread instances. Or, go back to sharing a single
>>>>>>> TermVectorsReader and synchronize per-document.
>>>>>>>
>
because the ThreadLocal
is holding strong references.
Yet, ThreadLocal is very convenient for avoiding
synchronization.
Does anyone have any ideas on how to solve this w/o falling
back to "normal" synchronization?
Mike
Begin forwarded message:
From: "Yonik Seeley"
's classes because the ThreadLocal is
holding strong references.
Yet, ThreadLocal is very convenient for avoiding
synchronization.
Does anyone have any ideas on how to solve this w/o falling
back to "normal" synchronization?
Mike
Begin forwarded message:
From: "Yon
s very convenient for avoiding synchronization.
Does anyone have any ideas on how to solve this w/o falling back to
"normal" synchronization?
Mike
Begin forwarded message:
From: "Yonik Seeley" <[EMAIL PROTECTED]>
Date: July 7, 2008 3:30:28 PM EDT
To: [EMAIL PROTECTED]
Su
Seeley" <[EMAIL PROTECTED]>
Date: July 7, 2008 3:30:28 PM EDT
To: [EMAIL PROTECTED]
Subject: Re: ThreadLocal in SegmentReader
Reply-To: [EMAIL PROTECTED]
On Mon, Jul 7, 2008 at 2:43 PM, Michael McCandless
<[EMAIL PROTECTED]> wrote:
So now I'm confused: the SegmentReader itself
e the classloader never fully deallocates Lucene's classes
>>> because the ThreadLocal is holding strong references.
>>>
>>> Yet, ThreadLocal is very convenient for avoiding synchronization.
>>>
>>> Does anyone have any ideas on how to solve this w/o f
, 2008 3:30:28 PM EDT
To: [EMAIL PROTECTED]
Subject: Re: ThreadLocal in SegmentReader
Reply-To: [EMAIL PROTECTED]
On Mon, Jul 7, 2008 at 2:43 PM, Michael McCandless
<[EMAIL PROTECTED]> wrote:
So now I'm confused: the SegmentReader itself should no longer be
reachable,
assuming you ar
15 matches
Mail list logo