Message355957
> I'm going to have to rescind the above statements. I was able to implement a new prototype of asyncio.ThreadPool (using ThreadPoolExecutor) that spawns it's threads asynchronously on startup. Since this one a bit more involved than the previous code examples, I created a gist: https://gist.github.com/aeros/8a86de6b13f17b9f717ea539ee1ee78f
Nice work! This is a great excercise, but we can really just use concurrent.futures.ThreadPool as is. Spawning threads is fast. As I mentioned before all we need to do is to design *our* API to NOT initialize pools in __init__, that's it. The design outlined in https://bugs.python.org/msg355881 would do that. |
|
Date |
User |
Action |
Args |
2019-11-04 16:22:47 | yselivanov | set | recipients:
+ yselivanov, asvetlov, primal, aeros |
2019-11-04 16:22:47 | yselivanov | set | messageid: <1572884567.39.0.559233892915.issue32309@roundup.psfhosted.org> |
2019-11-04 16:22:47 | yselivanov | link | issue32309 messages |
2019-11-04 16:22:47 | yselivanov | create | |
|