Skip to content

Commit

Permalink
locks: Drop comment regarding sleep() call
Browse files Browse the repository at this point in the history
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@gentoo.org>
Closes: #1418
Signed-off-by: Sam James <sam@gentoo.org>
  • Loading branch information
Flowdalic authored and thesamesam committed Jan 21, 2025
1 parent 2ccc673 commit 7405367
Showing 1 changed file with 0 additions and 6 deletions.
6 changes: 0 additions & 6 deletions lib/portage/locks.py
Original file line number Diff line number Diff line change
Expand Up @@ -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.
Expand Down

0 comments on commit 7405367

Please sign in to comment.