]> granicus.if.org Git - llvm/commitdiff
[LockFileManager] Reduce lock timeout
authorBruno Cardoso Lopes <bruno.cardoso@gmail.com>
Sat, 18 Mar 2017 00:32:34 +0000 (00:32 +0000)
committerBruno Cardoso Lopes <bruno.cardoso@gmail.com>
Sat, 18 Mar 2017 00:32:34 +0000 (00:32 +0000)
Go back to behavior pre-r231309 and reduce the timeout from 8 to ~1.5
min now that we have (a) PCMCache mechanism (r298165) and (b) timeout
that doesn't cause a failure, but actually build the module (r298175).

rdar://problem/30297862

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

lib/Support/LockFileManager.cpp

index 444aaa37c8c8360c08c0cdf44af06c794b2a2052..8be9879fbc2436d1f8962c1e91a76ebf7c2f2f20 100644 (file)
@@ -304,9 +304,9 @@ LockFileManager::WaitForUnlockResult LockFileManager::waitForUnlock() {
   Interval.tv_sec = 0;
   Interval.tv_nsec = 1000000;
 #endif
-  // 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;
+  // Don't wait more than 40s per iteration. Total timeout for the file
+  // to appear is ~1.5 minutes.
+  const unsigned MaxSeconds = 40;
   do {
     // Sleep for the designated interval, to allow the owning process time to
     // finish up and remove the lock file.