mirror of
https://github.com/python/cpython.git
synced 2025-12-08 06:10:17 +00:00
[3.14] gh-128639: Don't assume one thread in subinterpreter finalization with fixed daemon thread support (GH-134606) (GH-139050)
gh-128639: Don't assume one thread in subinterpreter finalization with fixed daemon thread support (GH-134606)
This reapplies GH-128640.
(cherry picked from commit a64881363b)
Co-authored-by: Peter Bierma <zintensitydev@gmail.com>
This commit is contained in:
parent
08bea299bf
commit
cec4ddf23e
6 changed files with 114 additions and 39 deletions
|
|
@ -132,6 +132,7 @@ def test_sys_path_0(self):
|
|||
'sub': sys.path[0],
|
||||
}}, indent=4), flush=True)
|
||||
""")
|
||||
interp.close()
|
||||
'''
|
||||
# <tmp>/
|
||||
# pkg/
|
||||
|
|
@ -172,7 +173,10 @@ def test_gh_109793(self):
|
|||
argv = [sys.executable, '-c', '''if True:
|
||||
from concurrent import interpreters
|
||||
interp = interpreters.create()
|
||||
raise Exception
|
||||
try:
|
||||
raise Exception
|
||||
finally:
|
||||
interp.close()
|
||||
''']
|
||||
proc = subprocess.run(argv, capture_output=True, text=True)
|
||||
self.assertIn('Traceback', proc.stderr)
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue