We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent ab087ce commit d332da1Copy full SHA for d332da1
Lib/test/test_list.py
@@ -318,7 +318,7 @@ def test_list_init_thread_safety(self):
318
import contextlib
319
320
def my_generator():
321
- for i in range(100000):
+ for i in range(1000000):
322
yield i
323
324
@@ -338,8 +338,9 @@ def gen_to_list(gen):
338
nonlocal amount
339
amount += 1
340
341
+ generator = my_generator()
342
with threading_helper.catch_threading_exception() as cm:
- ts = [Thread(target=gen_to_list, args=(my_generator(),)) for _ in range(thread_count)]
343
+ ts = [Thread(target=gen_to_list, args=(generator,)) for _ in range(thread_count)]
344
for t in ts:
345
t.start()
346
0 commit comments