Skip to content
Merged
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Prev Previous commit
Next Next commit
Make an explanatory comment more clear.
  • Loading branch information
gpshead committed Sep 26, 2024
commit 0889ab550d14d5ee514ffc3748e7b43af5bd1229
12 changes: 7 additions & 5 deletions Lib/test/support/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -2211,11 +2211,13 @@ def skip_if_broken_multiprocessing_synchronize():
# a file in /dev/shm/ directory.
import multiprocessing
synchronize.Lock(ctx=multiprocessing.get_context('fork'))
# The explicit fork mp context is required as relying on the
# default breaks TestResourceTracker.test_resource_tracker_reused
# when the default start method is not fork as synchronize creates
# a new multiprocessing.resource_tracker process at module import
# time via the above call in that scenario. This enables gh-84559.
# The explicit fork mp context is required in order for
# TestResourceTracker.test_resource_tracker_reused to work.
# synchronize creates a new multiprocessing.resource_tracker
# process at module import time via the above call in that
# scenario. Awkward. This enables gh-84559. No code involved
# should have threads at that point so fork() should be safe.
Comment thread
gpshead marked this conversation as resolved.

except OSError as exc:
raise unittest.SkipTest(f"broken multiprocessing SemLock: {exc!r}")

Expand Down