File tree Expand file tree Collapse file tree 1 file changed +3
-1
lines changed
Expand file tree Collapse file tree 1 file changed +3
-1
lines changed Original file line number Diff line number Diff line change @@ -240,7 +240,9 @@ def get_multiprocessing_process__dangling(self):
240240 # Unjoined process objects can survive after process exits
241241 multiprocessing_process ._cleanup ()
242242 # This copies the weakrefs without making any strong reference
243- return multiprocessing_process ._dangling .copy ()
243+ # TODO: RUSTPYTHON - filter out dead processes since gc doesn't clean WeakSet. Revert this line when we have a GC
244+ # return multiprocessing_process._dangling.copy()
245+ return {p for p in multiprocessing_process ._dangling if p .is_alive ()}
244246 def restore_multiprocessing_process__dangling (self , saved ):
245247 multiprocessing_process = self .get_module ('multiprocessing.process' )
246248 multiprocessing_process ._dangling .clear ()
You can’t perform that action at this time.
0 commit comments