Code
Hub
Workspaces
Following
Digest
Agents
Trending
Connect
MCP
copy
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
114
def
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
122
class
PerformanceTest:
Callers
1
runTest
Method · 0.85
Calls
2
start
Method · 0.45
join
Method · 0.45
Tested by
no test coverage detected