lucenenet-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From d...@apache.org
Subject svn commit: r802585 - /incubator/lucene.net/trunk/C#/src/Lucene.Net/SupportClass.cs
Date Sun, 09 Aug 2009 20:32:11 GMT
Author: digy
Date: Sun Aug  9 20:32:11 2009
New Revision: 802585

URL: http://svn.apache.org/viewvc?rev=802585&view=rev
Log:
Patch for SupportClass.ThreadClass.Sleep - LUCENENET-186(Lucene.Net.Search.TestTimeLimitedCollector)

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

Modified: incubator/lucene.net/trunk/C#/src/Lucene.Net/SupportClass.cs
URL: http://svn.apache.org/viewvc/incubator/lucene.net/trunk/C%23/src/Lucene.Net/SupportClass.cs?rev=802585&r1=802584&r2=802585&view=diff
==============================================================================
--- incubator/lucene.net/trunk/C#/src/Lucene.Net/SupportClass.cs (original)
+++ incubator/lucene.net/trunk/C#/src/Lucene.Net/SupportClass.cs Sun Aug  9 20:32:11 2009
@@ -487,7 +487,10 @@
         /// </summary>
         public void Join()
         {
-            threadField.Join();
+            lock (this)
+            {
+                threadField.Join();
+            }
         }
 
         /// <summary>
@@ -578,8 +581,7 @@
         {
             // casting long ms to int ms could lose resolution, however unlikely
             // that someone would want to sleep for that long...
-            // TimeSpan takes a 'ticks' argument, where 1 tick = 100 nanoseconds
-            System.Threading.Thread.Sleep(new TimeSpan(10 * ms));
+            System.Threading.Thread.Sleep((int)ms);
         }
 
         /// <summary>



Mime
View raw message