[Twisted-Python] deferToThread and thread pool

Andrew Bennetts andrew-twisted at puzzling.org
Wed Aug 31 01:18:08 EDT 2005

On Tue, Aug 30, 2005 at 09:17:10PM -0700, Brian Granger wrote:
> I have a few questions about the default implementation of  
> deferToThread.
> 1.  Does deferToThread use a thread pool by default?  If not, how can  
> I enable this?

Yes.  You can adjust the threadpool size using


> 2.  Which thread are the callbacks and errbacks of the deferred  
> returned by deferToThread run in?

The main thread, i.e. the reactor thread.


More information about the Twisted-Python mailing list