File tree 2 files changed +5
-15
lines changed
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):
1371
1371
return True
1372
1372
1373
1373
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
1382
1375
1383
1376
# Clear references to terminated threads
1384
1377
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):
538
538
539
539
540
540
class TestCase (unittest .TestCase ):
541
- def close_loop (self , loop ):
541
+ @staticmethod
542
+ def close_loop (loop ):
542
543
if loop ._default_executor is not None :
543
544
if not loop .is_closed ():
544
545
loop .run_until_complete (loop .shutdown_default_executor ())
@@ -557,12 +558,8 @@ def close_loop(self, loop):
557
558
pass
558
559
else :
559
560
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 )
566
563
567
564
def set_event_loop (self , loop , * , cleanup = True ):
568
565
if loop is None :
You can’t perform that action at this time.
0 commit comments