cvsimport
[beagle.git] / beagled / Lucene.Net / upstream-changes / 08_more-lock-obtain-fixes.patch
blob9a998be33f6840bd27ceae8d13d0c5e5a1b9f59c
1 From: Jon Trowbridge <trow@novell.com>
3 Enforce minimum maxSleepCount 1, we shouldn't just fail right away if
4 lockWaitTimeout < LOCK_POLL_INTERVAL.
6 Index: Store/Lock.cs
7 ===================================================================
8 RCS file: /cvs/gnome/beagle/beagled/Lucene.Net/Store/Lock.cs,v
9 retrieving revision 1.6.4.9
10 diff -u -3 -p -r1.6.4.9 Lock.cs
11 --- Store/Lock.cs 25 Sep 2006 22:54:07 -0000 1.6.4.9
12 +++ Store/Lock.cs 30 Sep 2006 02:00:45 -0000
13 @@ -61,6 +61,8 @@ namespace Lucene.Net.Store
14 bool locked = Obtain();
15 int maxSleepCount = (int) (lockWaitTimeout / LOCK_POLL_INTERVAL);
16 int sleepCount = 0;
17 + maxSleepCount = System.Math.Max (maxSleepCount, 1);
19 while (!locked)
21 if (sleepCount++ == maxSleepCount)
22 @@ -135,4 +137,4 @@ namespace Lucene.Net.Store
27 \ No newline at end of file