MCPcopy Create free account
hub / github.com/pyca/cryptography / test_thread_stress

Method test_thread_stress

tests/test_rust_utils.py:46–63  ·  view source on GitHub ↗
(self)

Source from the content-addressed store, hash-verified

44 ]
45
46 def test_thread_stress(self):
47 def create():
48 return None
49
50 pool = FixedPool(create)
51
52 def thread_fn():
53 with pool.acquire():
54 pass
55
56 threads = []
57 for i in range(1024):
58 t = threading.Thread(target=thread_fn)
59 t.start()
60 threads.append(t)
61
62 for t in threads:
63 t.join()

Callers

nothing calls this directly

Calls 1

FixedPoolClass · 0.85

Tested by

no test coverage detected