gh-115258: Fix failed tests on threading queue shutdown by YvesDup · Pull Request #115940 · python/cpython (original) (raw)

diff --git a/Lib/test/test_queue.py b/Lib/test/test_queue.py index 9dc7f62999..d223c358e0 100644 --- a/Lib/test/test_queue.py +++ b/Lib/test/test_queue.py @@ -320,58 +320,90 @@ def test_shutdown_immediate_all_methods_in_one_thread(self): def _write_msg_thread(self, q, n, results, i_when_exec_shutdown, event_shutdown, barrier_start):

@@ -382,11 +414,14 @@ def _shutdown_all_methods_in_many_threads(self, immediate): nb_msgs = 1024*64 nb_msgs_w = nb_msgs // write_threads when_exec_shutdown = nb_msgs_w // 2

@@ -395,19 +430,34 @@ def _shutdown_all_methods_in_many_threads(self, immediate): (self._join_thread, join_threads, (q, barrier_start)), (self._shutdown_thread, 1, (q, res_shutdown, ev_exec_shutdown, immediate)), )