File tree Expand file tree Collapse file tree 2 files changed +5
-15
lines changed Expand file tree Collapse file tree 2 files changed +5
-15
lines changed Original file line number Diff line number Diff line change @@ -1371,14 +1371,7 @@ def is_active(self):
13711371 return True
13721372
13731373 def close (self ):
1374- self ._join_threads ()
1375-
1376- def _join_threads (self , timeout = None ):
1377- """Internal: Join all non-daemon threads"""
1378- threads = [thread for thread in list (self ._threads .values ())
1379- if thread .is_alive () and not thread .daemon ]
1380- for thread in threads :
1381- thread .join (timeout )
1374+ pass
13821375
13831376 # Clear references to terminated threads
13841377 self ._threads = {key : thread for key , thread in self ._threads .items ()
Original file line number Diff line number Diff line change @@ -538,7 +538,8 @@ def get_function_source(func):
538538
539539
540540class TestCase (unittest .TestCase ):
541- def close_loop (self , loop ):
541+ @staticmethod
542+ def close_loop (loop ):
542543 if loop ._default_executor is not None :
543544 if not loop .is_closed ():
544545 loop .run_until_complete (loop .shutdown_default_executor ())
@@ -557,12 +558,8 @@ def close_loop(self, loop):
557558 pass
558559 else :
559560 if isinstance (watcher , asyncio .ThreadedChildWatcher ):
560- watcher ._join_threads (timeout = support .SHORT_TIMEOUT )
561- threads = {key : thread for key , thread in watcher ._threads .items ()
562- if thread .is_alive () and not thread .daemon }
563- if threads :
564- self .fail (f"watcher still has running threads: "
565- f"{ threads } " )
561+ for thread in list (watcher ._threads .values ()):
562+ thread .join (timeout = support .SHORT_TIMEOUT )
566563
567564 def set_event_loop (self , loop , * , cleanup = True ):
568565 if loop is None :
You can’t perform that action at this time.
0 commit comments