execution pool 源码
展览会 简单的异步执行池原语。 您可以将其视为协程的threading.ThreadPool 。 用法 import asyncio from expool import ExecutionPoolSimple async def main (): pool = ExecutionPoolSimple ( size = 3 ) # size parameter sets the max amount of concurrent coroutines async def some_job (): await asyncio . sleep ( 3 ) await pool . add ( some_job ) # Returns immediately if the pool is not full. await poo
下载地址
用户评论