Author: rfm
Date: Fri Oct  3 13:28:22 2014
New Revision: 38103

URL: http://svn.gna.org/viewcvs/gnustep?rev=38103&view=rev
Log:
tweak for a final pass through the loop

Modified:
    libs/sqlclient/trunk/SQLClientPool.m

Modified: libs/sqlclient/trunk/SQLClientPool.m
URL: 
http://svn.gna.org/viewcvs/gnustep/libs/sqlclient/trunk/SQLClientPool.m?rev=38103&r1=38102&r2=38103&view=diff
==============================================================================
--- libs/sqlclient/trunk/SQLClientPool.m        (original)
+++ libs/sqlclient/trunk/SQLClientPool.m        Fri Oct  3 13:28:22 2014
@@ -183,7 +183,14 @@
       locked = NO;
       while (NO == locked && now < end)
         {
-          if ([when earlierDate: until] == until)
+          now = [NSDate timeIntervalSinceReferenceDate];
+          if (now >= end)
+            {
+              /* End date is passed ... try to get the lock immediately.
+               */
+              locked = [lock tryLockWhenCondition: 1];
+            }
+          else if ([when earlierDate: until] == until)
             { 
               locked = [lock lockWhenCondition: 1 beforeDate: until];
             }
@@ -191,7 +198,6 @@
             { 
               locked = [lock lockWhenCondition: 1 beforeDate: when];
             }
-          now = [NSDate timeIntervalSinceReferenceDate];
           dif = now - start;
           if (NO == locked && now < end)
             {


_______________________________________________
Gnustep-cvs mailing list
[email protected]
https://mail.gna.org/listinfo/gnustep-cvs

Reply via email to