run_in_executor

  原型 :python awaitable loop.run_in_executor(executor, func, *args) 异步 参数 : executor 能够是  ThreadPoolExecutor / ProcessPool  , 若是是None 则使用默认线程池async 可以使用 yield from 或 await 挂起函数函数   做用  : 例如在异步事件循环中 写文件
本站公众号
   欢迎关注本站公众号,获取更多信息