Commit 05eafa88 authored by Antoine Pitrou's avatar Antoine Pitrou

Make test.support.reap_threads() faster

parent 95b21460
...@@ -1750,12 +1750,12 @@ def threading_setup(): ...@@ -1750,12 +1750,12 @@ def threading_setup():
def threading_cleanup(*original_values): def threading_cleanup(*original_values):
if not _thread: if not _thread:
return return
_MAX_COUNT = 10 _MAX_COUNT = 100
for count in range(_MAX_COUNT): for count in range(_MAX_COUNT):
values = _thread._count(), threading._dangling values = _thread._count(), threading._dangling
if values == original_values: if values == original_values:
break break
time.sleep(0.1) time.sleep(0.01)
gc_collect() gc_collect()
# XXX print a warning in case of failure? # XXX print a warning in case of failure?
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment