Skip to content
Merged
Changes from all commits
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
5 changes: 5 additions & 0 deletions Lib/test/test_io.py
Original file line number Diff line number Diff line change
Expand Up @@ -3732,6 +3732,7 @@ def check_daemon_threads_shutdown_deadlock(self, stream_name):
import sys
import time
import threading
from test.support import SuppressCrashReport

file = sys.{stream_name}

Expand All @@ -3740,6 +3741,10 @@ def run():
file.write('.')
file.flush()

crash = SuppressCrashReport()
crash.__enter__()
# don't call __exit__(): the crash occurs at Python shutdown

thread = threading.Thread(target=run)
thread.daemon = True
thread.start()
Expand Down