From 7405367572e2f07cd35a5abd28212c640ac89b10 Mon Sep 17 00:00:00 2001 From: Florian Schmaus Date: Sun, 12 Jan 2025 12:41:33 +0100 Subject: [PATCH] locks: Drop comment regarding sleep() call The call was added with 78b1ba8 in 2004 and later commented out with 989d520f6ef6 in 2004 (both from portage-cvs.git). It should be safe to say that it did not prove necessary, so let's remove it. Signed-off-by: Florian Schmaus Closes: https://github.com/gentoo/portage/pull/1418 Signed-off-by: Sam James --- lib/portage/locks.py | 6 ------ 1 file changed, 6 deletions(-) diff --git a/lib/portage/locks.py b/lib/portage/locks.py index ee40451b12..c3eff5c56d 100644 --- a/lib/portage/locks.py +++ b/lib/portage/locks.py @@ -549,12 +549,6 @@ def unlockfile(mytuple): raise OSError(_("Failed to unlock file '%s'\n") % lockfilename) try: - # This sleep call was added to allow other processes that are - # waiting for a lock to be able to grab it before it is deleted. - # lockfile() already accounts for this situation, however, and - # the sleep here adds more time than is saved overall, so am - # commenting until it is proved necessary. - # time.sleep(0.0001) if unlinkfile: locking_method(myfd, fcntl.LOCK_EX | fcntl.LOCK_NB) # We won the lock, so there isn't competition for it.