Skip to content

Commit 0889ab5

Browse files
committed
Make an explanatory comment more clear.
1 parent 4492574 commit 0889ab5

File tree

1 file changed

+7
-5
lines changed

1 file changed

+7
-5
lines changed

Lib/test/support/__init__.py

Lines changed: 7 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -2211,11 +2211,13 @@ def skip_if_broken_multiprocessing_synchronize():
22112211
# a file in /dev/shm/ directory.
22122212
import multiprocessing
22132213
synchronize.Lock(ctx=multiprocessing.get_context('fork'))
2214-
# The explicit fork mp context is required as relying on the
2215-
# default breaks TestResourceTracker.test_resource_tracker_reused
2216-
# when the default start method is not fork as synchronize creates
2217-
# a new multiprocessing.resource_tracker process at module import
2218-
# time via the above call in that scenario. This enables gh-84559.
2214+
# The explicit fork mp context is required in order for
2215+
# TestResourceTracker.test_resource_tracker_reused to work.
2216+
# synchronize creates a new multiprocessing.resource_tracker
2217+
# process at module import time via the above call in that
2218+
# scenario. Awkward. This enables gh-84559. No code involved
2219+
# should have threads at that point so fork() should be safe.
2220+
22192221
except OSError as exc:
22202222
raise unittest.SkipTest(f"broken multiprocessing SemLock: {exc!r}")
22212223

0 commit comments

Comments
 (0)