# When this program using python 3.9.11 in 90% of the cases # it crashes. import _testcapi import threading code = """ import sqlite3 """ def doIt(): _testcapi.run_in_subinterp(code) tt=[] for i in range(16): t = threading.Thread(target=doIt) t.start() tt.append(t) for t in tt: t.join()