[Twisted-Python] Has anybody integrated multiple threadpools into reactor?

Hello, if so, could you point me in the right direction? Furthermore: Is there an easy way to avoid the threadpool overhead when I actually only want to have one dedicated thread to fulfill a blocking job? TIA, andreas

Just use twisted.python.threadpool.ThreadPool instances. You can reactor.suggestThreadPoolSize or something wiht size 1, or start your own threadpool with size 1.

On Tue, 2004-10-19 at 11:17, Itamar Shtull-Trauring wrote:
I would strongly recommend against using ThreadPool. Just use callInThread - there is already a pool of worker threads. Starting and stopping threadpools with the reactor is difficult to test and easy to get wrong.

Just use twisted.python.threadpool.ThreadPool instances. You can reactor.suggestThreadPoolSize or something wiht size 1, or start your own threadpool with size 1.

On Tue, 2004-10-19 at 11:17, Itamar Shtull-Trauring wrote:
I would strongly recommend against using ThreadPool. Just use callInThread - there is already a pool of worker threads. Starting and stopping threadpools with the reactor is difficult to test and easy to get wrong.
participants (3)
-
Ames Andreas (MPA/DF)
-
Glyph Lefkowitz
-
Itamar Shtull-Trauring