Python 3: How to submit an async function to a threadPool?
问题 I want to use both ThreadPoolExecutor from concurrent.futures and async functions. My program repeatedly submits a function with different input values to a thread pool. The final sequence of tasks that are executed in that larger function can be in any order, and I don't care about the return value, just that they execute at some point in the future. So I tried to do this async def startLoop(): while 1: for item in clients: arrayOfFutures.append(await config.threadPool.submit(threadWork, obj