更新时间:2023-12-04 23:25:10
我确实没有答案,但是我阅读了Apply_async的文档,似乎与您提出的问题背道而驰...
I don't really have an answer but I read the docs for Apply_async and it seems counter to your stated problem...
回调应立即完成,因为否则该线程将 处理结果将被阻止.
Callbacks should complete immediately since otherwise the thread which handles the results will get blocked.
I'm not familiar with the Pool but it seems to me that your use-case could easily be handled by this recipe on Python Module of the Week