Skip to content
Merged
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Prev Previous commit
Next Next commit
Mark test_create_many_threaded with bigmemtest.
  • Loading branch information
serhiy-storchaka committed Nov 8, 2023
commit 6aecbf923374aed3c75003a38afe87d0fbf6ddae
11 changes: 6 additions & 5 deletions Lib/test/test_interpreters.py
Original file line number Diff line number Diff line change
Expand Up @@ -591,16 +591,17 @@ def test_create_many_sequential(self):
support.gc_collect()

@support.requires_resource('cpu')
def test_create_many_threaded(self):
@support.bigmemtest(size=6.39*2**30, memuse=1, dry_run=False)
def test_create_many_threaded(self, size):
alive = []
start = threading.Event()
def task():
# try to create all interpreters simultaneously
if not start.wait(10):
raise TimeoutError
for _ in range(20):
interp = interpreters.create()
alive.append(interp)
threads = [threading.Thread(target=task) for _ in range(10)]
interp = interpreters.create()
alive.append(interp)
threads = [threading.Thread(target=task) for _ in range(200)]
with threading_helper.start_threads(threads):
start.set()
del alive
Expand Down