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

Function joinall

test/utils.py:149–156  ·  view source on GitHub ↗

Join threads with a 5-minute timeout, assert joins succeeded

(tasks)

Source from the content-addressed store, hash-verified

147
148
149def joinall(tasks):
150 """Join threads with a 5-minute timeout, assert joins succeeded"""
151 if _IS_SYNC:
152 for t in tasks:
153 t.join(300)
154 assert not t.is_alive(), "Thread %s hung" % t
155 else:
156 asyncio.wait([t.task for t in tasks if t is not None], timeout=300)
157
158
159def flaky(

Callers 7

test_threaded_readsMethod · 0.90
test_threaded_writesMethod · 0.90
test_threaded_readsMethod · 0.90
test_threaded_writesMethod · 0.90
test_max_pool_sizeMethod · 0.90
test_threadingMethod · 0.90

Calls 3

joinMethod · 0.45
is_aliveMethod · 0.45
waitMethod · 0.45

Tested by 7

test_threaded_readsMethod · 0.72
test_threaded_writesMethod · 0.72
test_threaded_readsMethod · 0.72
test_threaded_writesMethod · 0.72
test_max_pool_sizeMethod · 0.72
test_threadingMethod · 0.72