Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(231)

Unified Diff: syzygy/build/gitdeps.py

Issue 2693863004: Fix race condition in gitdeps.py (Closed)
Patch Set: Created 3 years, 10 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « no previous file | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: syzygy/build/gitdeps.py
diff --git a/syzygy/build/gitdeps.py b/syzygy/build/gitdeps.py
index 3764793d4333b667615de86456407aa79f6ee97a..8af651ce6a928ab13e4e2abc75a5041c1ba282f1 100644
--- a/syzygy/build/gitdeps.py
+++ b/syzygy/build/gitdeps.py
@@ -529,8 +529,8 @@ def _InstallRepository(options, repo):
_RemoveOrphanedJunction(options, j)
newpath = _RenameCheckout(repo.checkout_dir, options.dry_run)
- body = lambda: _DeleteCheckout(newpath, options.dry_run)
- thread = threading.Thread(target=body)
+ thread = threading.Thread(target=_DeleteCheckout,
+ args=(newpath, options.dry_run))
threads.append(thread)
thread.start()
@@ -902,8 +902,8 @@ def main():
for path in glob.glob(os.path.join(options.cache_dir, '*')):
if os.path.join(path, 'src') not in checkout_dirs:
_LOGGER.debug('Erasing orphaned checkout directory: %s', path)
- body = lambda: _DeleteCheckout(path, options.dry_run)
- thread = threading.Thread(target=body)
+ thread = threading.Thread(target=_DeleteCheckout,
+ args=(path, options.dry_run))
threads.append(thread)
thread.start()
for thread in threads:
« no previous file with comments | « no previous file | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698