commit:     7405367572e2f07cd35a5abd28212c640ac89b10
Author:     Florian Schmaus <flow <AT> gentoo <DOT> org>
AuthorDate: Sun Jan 12 11:41:33 2025 +0000
Commit:     Sam James <sam <AT> gentoo <DOT> org>
CommitDate: Tue Jan 21 21:11:52 2025 +0000
URL:        https://gitweb.gentoo.org/proj/portage.git/commit/?id=74053675

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 <flow <AT> gentoo.org>
Closes: https://github.com/gentoo/portage/pull/1418
Signed-off-by: Sam James <sam <AT> gentoo.org>

 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.

Reply via email to