Skip to content

Commit 56984ad

Browse files
committed
Better document what the mock io is helping exercise
1 parent d290be7 commit 56984ad

1 file changed

Lines changed: 5 additions & 0 deletions

File tree

‎Lib/test/test_io/test_general.py‎

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1378,6 +1378,11 @@ def release_daemon_thread():
13781378
from test.support import SuppressCrashReport
13791379
13801380
# Mock I/O that blocks daemon thread in Raw I/O write.
1381+
#
1382+
# BufferedIO holds a lock while doing I/O operations. Use a
1383+
# threading Event to simulate a thread doing a slow I/O which holds
1384+
# the lock on sys.stdout, sys.stderr blocking normal cleanup of
1385+
# those streams during interpreter finalization.
13811386
class GatedRaw(io.RawIOBase):
13821387
name = '<{stream_name}>'
13831388

0 commit comments

Comments
 (0)