beagle r4513 - in branches/beagle-lucene2_1/beagled/Lucene.Net: Store upstream-changes
- From: dbera svn gnome org
- To: svn-commits-list gnome org
- Subject: beagle r4513 - in branches/beagle-lucene2_1/beagled/Lucene.Net: Store upstream-changes
- Date: Fri, 22 Feb 2008 00:08:59 +0000 (GMT)
Author: dbera
Date: Fri Feb 22 00:08:59 2008
New Revision: 4513
URL: http://svn.gnome.org/viewvc/beagle?rev=4513&view=rev
Log:
Patch old 08_more-lock-obtain-fixes.patch
Added:
branches/beagle-lucene2_1/beagled/Lucene.Net/upstream-changes/04_lock-obtain-maxtimeout.patch
Modified:
branches/beagle-lucene2_1/beagled/Lucene.Net/Store/Lock.cs
Modified: branches/beagle-lucene2_1/beagled/Lucene.Net/Store/Lock.cs
==============================================================================
--- branches/beagle-lucene2_1/beagled/Lucene.Net/Store/Lock.cs (original)
+++ branches/beagle-lucene2_1/beagled/Lucene.Net/Store/Lock.cs Fri Feb 22 00:08:59 2008
@@ -68,6 +68,7 @@
bool locked = Obtain();
int maxSleepCount = (int) (lockWaitTimeout / LOCK_POLL_INTERVAL);
int sleepCount = 0;
+ maxSleepCount = System.Math.Max (maxSleepCount, 1);
while (!locked)
{
if (sleepCount++ == maxSleepCount)
@@ -144,4 +145,4 @@
}
}
}
-}
\ No newline at end of file
+}
Added: branches/beagle-lucene2_1/beagled/Lucene.Net/upstream-changes/04_lock-obtain-maxtimeout.patch
==============================================================================
--- (empty file)
+++ branches/beagle-lucene2_1/beagled/Lucene.Net/upstream-changes/04_lock-obtain-maxtimeout.patch Fri Feb 22 00:08:59 2008
@@ -0,0 +1,24 @@
+From: Jon Trowbridge <trow novell com>
+
+Enforce minimum maxSleepCount 1, we shouldn't just fail right away if
+lockWaitTimeout < LOCK_POLL_INTERVAL.
+
+Index: Store/Lock.cs
+===================================================================
+--- Store/Lock.cs (revision 4506)
++++ Store/Lock.cs (working copy)
+@@ -68,6 +68,7 @@
+ bool locked = Obtain();
+ int maxSleepCount = (int) (lockWaitTimeout / LOCK_POLL_INTERVAL);
+ int sleepCount = 0;
++ maxSleepCount = System.Math.Max (maxSleepCount, 1);
+ while (!locked)
+ {
+ if (sleepCount++ == maxSleepCount)
+@@ -144,4 +145,4 @@
+ }
+ }
+ }
+-}
+\ No newline at end of file
++}
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]