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 7fb39bc commit 78241a8Copy full SHA for 78241a8
Lib/test/test_free_threading/test_set.py
@@ -214,7 +214,8 @@ def reader():
214
215
def test_iternext_concurrent_exhaust_race(self):
216
NUM_LOOPS = 20_000
217
- barrier = Barrier(3)
+ number_of_threads = 3
218
+ barrier = Barrier(number_of_threads)
219
box = {"it": None}
220
221
def advancer():
@@ -235,11 +236,7 @@ def producer():
235
236
barrier.wait()
237
238
- threads = [
239
- Thread(target=advancer),
240
241
- Thread(target=producer),
242
- ]
+ threads = [Thread(target=advancer) for _ in range(number_of_threads)]
243
for t in threads:
244
t.start()
245
0 commit comments