I reconsidered it and there is no race condition. A new slot will be created for each thread. But NullReferenceException bug is still there.
DIGY -----Original Message----- From: Robert Jordan [mailto:robe...@gmx.net] Sent: Thursday, September 22, 2011 1:16 AM To: lucene-net-...@incubator.apache.org Subject: Re: [Lucene.Net] 2.9.4 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. I'd rather get rid of Init() for this code: static SupportClass.WeakHashTable slots = new SupportClass.WeakHashTable(); Robert > > DIGY > > > > -----Original Message----- > From: Robert Jordan [mailto:robe...@gmx.net] > Sent: Wednesday, September 21, 2011 3:09 PM > To: lucene-net-...@incubator.apache.org > Subject: Re: [Lucene.Net] 2.9.4 > > On 20.09.2011 23:48, Prescott Nasser wrote: >> Hey all seems like we are set with 2.9.4? Feedback has been positive and > its been quiet. Do we feel ready to vote for a new release? > > I don't know if the build infrastructure is part of the > release. If yes, then there is an open issue: > > Contrib doesn't build right now because there > are some assembly name mismatches between certain *.csproj > files and build/scripts/contrib.targets. > > The following patches should fix the issue: > > https://github.com/robert-j/lucene.net/commit/c5218bca56c19b3407648224781eec > 7316994a39 > > https://github.com/robert-j/lucene.net/commit/50bad187655d59968d51d472b57c2a > 40e201d663 > > > Also, the fix for [LUCENENET-358] is basically making > Lucene.Net.dll a .NET 4.0-only assembly: > > https://github.com/apache/lucene.net/commit/23ea6f52362fc7dbce48fd012cea129a > 7350c73c > > Did we agree about abandoning .NET<= 3.5? > > Robert > > ----- > > Checked by AVG - www.avg.com > Version: 2012.0.1809 / Virus Database: 2085/4510 - Release Date: 09/21/11 > > ----- Checked by AVG - www.avg.com Version: 2012.0.1809 / Virus Database: 2085/4510 - Release Date: 09/21/11