MCPcopy Index your code
hub / github.com/mongodb/mongo-python-driver / threaded

Function threaded

test/performance/perf_test.py:114–119  ·  view source on GitHub ↗
(n_threads, func)

Source from the content-addressed store, hash-verified

112
113
114def threaded(n_threads, func):
115 threads = [threading.Thread(target=func) for _ in range(n_threads)]
116 for t in threads:
117 t.start()
118 for t in threads:
119 t.join()
120
121
122class PerformanceTest:

Callers 1

runTestMethod · 0.85

Calls 2

startMethod · 0.45
joinMethod · 0.45

Tested by

no test coverage detected