Author aeros
Recipients aeros, asvetlov, primal, yselivanov
Date 2019-11-04.11:15:07
SpamBayes Score -1.0
Marked as misclassified Yes
Message-id <1572866108.11.0.847614201892.issue32309@roundup.psfhosted.org>
In-reply-to
Content
> The asynchronous spawning of threads or processes would also not be compatible with the executor subclasses as far as I can tell.

> Thus, it seemed to make more sense to me to actually build up a new Pool class from scratch that was largely based on Executor, but with significantly differing functionality. Otherwise, it seems like we would have to make some modifications to ThreadPoolExecutor, or inherit from it and then redesign the internals of some of the methods to change the way the threads/processes are spawned. 

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

It's by no means a complete implementation, but it at least proves the functionality that Yury described is very much possible using the existing ThreadPoolExecutor class.
History
Date User Action Args
2019-11-04 11:15:08aerossetrecipients: + aeros, asvetlov, yselivanov, primal
2019-11-04 11:15:08aerossetmessageid: <1572866108.11.0.847614201892.issue32309@roundup.psfhosted.org>
2019-11-04 11:15:08aeroslinkissue32309 messages
2019-11-04 11:15:07aeroscreate