lucenenet-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From d...@apache.org
Subject svn commit: r834159 - /incubator/lucene.net/trunk/C#/src/Lucene.Net/Util/CloseableThreadLocal.cs
Date Mon, 09 Nov 2009 17:46:39 GMT
Author: digy
Date: Mon Nov  9 17:46:38 2009
New Revision: 834159

URL: http://svn.apache.org/viewvc?rev=834159&view=rev
Log:
LUCENENET-209  CloseableThreadLocal bug 

Modified:
    incubator/lucene.net/trunk/C#/src/Lucene.Net/Util/CloseableThreadLocal.cs

Modified: incubator/lucene.net/trunk/C#/src/Lucene.Net/Util/CloseableThreadLocal.cs
URL: http://svn.apache.org/viewvc/incubator/lucene.net/trunk/C%23/src/Lucene.Net/Util/CloseableThreadLocal.cs?rev=834159&r1=834158&r2=834159&view=diff
==============================================================================
--- incubator/lucene.net/trunk/C#/src/Lucene.Net/Util/CloseableThreadLocal.cs (original)
+++ incubator/lucene.net/trunk/C#/src/Lucene.Net/Util/CloseableThreadLocal.cs Mon Nov  9 17:46:38
2009
@@ -56,7 +56,7 @@
 		public virtual System.Object Get()
 		{
 			System.WeakReference weakRef = (System.WeakReference) System.Threading.Thread.GetData(t);
-			if (weakRef == null)
+			if (weakRef == null || weakRef.Target==null)
 			{
 				System.Object iv = InitialValue();
 				if (iv != null)
@@ -93,7 +93,7 @@
                         tmp.Add(t);
 					}
 				}
-                foreach (System.Threading.Thread th in tmp)
+                foreach (SupportClass.ThreadClass th in tmp)
                 {
                     hardRefs.Remove(th);
                 }



Mime
View raw message