def test_call_in_executor(executor):
"""Test that call_in_thread actually runs the target in a worker thread."""
assert not await call_in_executor(lambda: current_thread() is main_thread(),
executor=executor)
评论列表
文章目录