12 2020 档案
摘要:asyncio.run_coroutine_threadsafe 和 run_in_executor 是一对反义词。asyncio.run_coroutine_threadsafe 是在非异步的上下文环境(也就是正常的同步语法的函数里面)下调用异步函数对象(协程),因为当前函数定义没有被async修
阅读全文
摘要:from functools import partial import asyncio from threadpool_executor_shrink_able import ThreadPoolExecutorShrinkAble # 没有使用内置的 concurrent.futures里面的,
阅读全文