mirror of
https://github.com/python/cpython.git
synced 2025-08-04 08:59:19 +00:00
GH-110829: Ensure Thread.join() joins the OS thread (#110848)
Joining a thread now ensures the underlying OS thread has exited. This is required for safer fork() in multi-threaded processes. --------- Co-authored-by: blurb-it[bot] <43283697+blurb-it[bot]@users.noreply.github.com>
This commit is contained in:
parent
a28a3967ab
commit
0e9c364f4a
14 changed files with 676 additions and 103 deletions
|
@ -2693,6 +2693,9 @@ class _TestPool(BaseTestCase):
|
|||
p.join()
|
||||
|
||||
def test_terminate(self):
|
||||
if self.TYPE == 'threads':
|
||||
self.skipTest("Threads cannot be terminated")
|
||||
|
||||
# Simulate slow tasks which take "forever" to complete
|
||||
p = self.Pool(3)
|
||||
args = [support.LONG_TIMEOUT for i in range(10_000)]
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue