run_in_executor

  原型 :python awaitable loop.run_in_executor(executor, func, *args) 異步 參數 : executor 能夠是  ThreadPoolExecutor / ProcessPool  , 若是是None 則使用默認線程池async 可以使用 yield from 或 await 掛起函數函數   做用  : 例如在異步事件循環中 寫文件
本站公眾號
   歡迎關注本站公眾號,獲取更多信息