Fix flakiness in test_asyncprocess
@@ -107,6 +107,11 @@ def test_simple():
del proc
gc.collect()
+ if wr1() is not None:
+ # Perhaps the GIL switched before _watch_process() exit,
+ # help it a little
+ sleep(0.001)
+ gc.collect()
if wr1() is not None:
# Help diagnosing
from types import FrameType
