allow filesystem locks to wait a lot longer in case we are on a very slow system

git-svn-id: svn+ssh://svn.gna.org/svn/gnustep/libs/base/trunk@39561 72102866-910b-0410-8b05-ffd578937521
This commit is contained in:
Richard Frith-MacDonald 2016-03-17 20:11:29 +00:00
parent 67e4c0581d
commit d27923f0fa

View file

@ -2345,14 +2345,14 @@ static BOOL isLocked = NO;
/*
* In case we have tried and failed to break the lock,
* we give up after a while ... 16 seconds should give
* us three lock breaks if we do them at 5 second
* we give up after a while ... 66 seconds should give
* us three lock breaks if we do them at 20 second
* intervals.
*/
if ([when timeIntervalSinceDate: started] > 16.0)
if ([when timeIntervalSinceDate: started] > 66.0)
{
fprintf(stderr, "Failed to lock user defaults database even after "
"breaking old locks!\n");
fprintf(stderr, "Failed to lock user defaults database"
" even after breaking old locks!\n");
RELEASE(arp);
break;
}
@ -2362,7 +2362,7 @@ static BOOL isLocked = NO;
* problem we do an idle wait rather than a busy one.
*/
if (lockDate != nil
&& [when timeIntervalSinceDate: lockDate] > 5.0)
&& [when timeIntervalSinceDate: lockDate] > 20.0)
{
NSLog(@"NSUserdefaults file lock at %@ is dated %@ ... break",
_fileLock, lockDate);