lucenenet-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Robert Jordan <robe...@gmx.net>
Subject Re: [Lucene.Net] 2.9.4
Date Wed, 21 Sep 2011 22:22:12 GMT
On 22.09.2011 00:16, Robert Jordan wrote:
> Hi Digy,
>
> On 21.09.2011 23:38, Digy wrote:
>> @Robert
>>
>>> Also, the fix for [LUCENENET-358] is basically making Lucene.Net.dll a
>> .NET 4.0-only assembly:
>>
>> There is a commented part at the end of the CloseableThreadLocal which
>> may
>> seem familiar to you :)
>
> Indeed :) I've missed this comment.
>
>> No harm in uncommenting it and no conditional compilation is needed.
>> It also pass all test cases.
>
> BTW, there is an issue with this commented-out code. If Value
> is not accessed at least once, Dispose() will fail with a
> NullReferenceException. There is also a little chance for
> a race condition.

Scratch this. The whole point of ThreadLocal<T> is actually
Init(). Sorry for the noise :)

Robert


Mime
View raw message