[Support] Increase timeout for the LockFileManager back to 5 mins.
authorArgyrios Kyrtzidis <akyrtzi@gmail.com>
Wed, 4 Mar 2015 22:54:38 +0000 (22:54 +0000)
committerArgyrios Kyrtzidis <akyrtzi@gmail.com>
Wed, 4 Mar 2015 22:54:38 +0000 (22:54 +0000)
Waiting for just 1 min may not be enough for some contexts.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@231309 91177308-0d34-0410-b5e6-96231b3b80d8

lib/Support/LockFileManager.cpp

index ec3158c3bc1bdcbf59ce54ccce8c2b612290c8c7..2a0178bcc5b7b157a54aad05505190290a71e866 100644 (file)
@@ -186,8 +186,9 @@ LockFileManager::WaitForUnlockResult LockFileManager::waitForUnlock() {
   Interval.tv_sec = 0;
   Interval.tv_nsec = 1000000;
 #endif
-  // Don't wait more than one minute for the file to appear.
-  const unsigned MaxSeconds = 60;
+  // Don't wait more than five minutes per iteration. Total timeout for the file
+  // to appear is ~8.5 mins.
+  const unsigned MaxSeconds = 5*60;
   do {
     // Sleep for the designated interval, to allow the owning process time to
     // finish up and remove the lock file.