Skip to content

Commit 5a23e22

Browse files
committed
temp regrtest save_env patch
1 parent cc23a67 commit 5a23e22

File tree

1 file changed

+3
-1
lines changed

1 file changed

+3
-1
lines changed

Lib/test/libregrtest/save_env.py

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff 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()

0 commit comments

Comments
 (0)