diff --git a/Lib/multiprocessing/queues.py b/Lib/multiprocessing/queues.py index 90844fe..89f4eb6 100644 --- a/Lib/multiprocessing/queues.py +++ b/Lib/multiprocessing/queues.py @@ -235,6 +235,7 @@ class Queue(object): if obj is sentinel: debug('feeder thread got sentinel -- exiting') close() + time.sleep(1) return # serialize the data before acquiring the lock diff --git a/Lib/test/support/__init__.py b/Lib/test/support/__init__.py index 313c230..642c143 100644 --- a/Lib/test/support/__init__.py +++ b/Lib/test/support/__init__.py @@ -2038,7 +2038,7 @@ def threading_cleanup(*original_values): if not _thread: return - _MAX_COUNT = 100 + _MAX_COUNT = 10 t0 = time.monotonic() for count in range(_MAX_COUNT): values = _thread._count(), threading._dangling