]> git.lizzy.rs Git - rust.git/blobdiff - src/bootstrap/bootstrap.py
rustc_metadata: Rename `item_children(_untracked)` to `module_children(_untracked)`
[rust.git] / src / bootstrap / bootstrap.py
index 5235a6b8180533ea4269aa35ef423fdeb65637eb..7c36bb264c45ee0b5ca049a409759d8d88b90d58 100644 (file)
@@ -13,7 +13,7 @@ import sys
 import tarfile
 import tempfile
 
-from time import time
+from time import time, sleep
 
 # Acquire a lock on the build directory to make sure that
 # we don't cause a race condition while building
@@ -42,8 +42,10 @@ def acquire_lock(build_dir):
             while True:
                 try:
                     curs.execute("BEGIN EXCLUSIVE")
+                    break
                 except sqlite3.OperationalError:
                     pass
+                sleep(0.25)
             return curs
     except ImportError:
         print("warning: sqlite3 not available in python, skipping build directory lock")