[Twisted-web] Connection Pool?
Phil Mayers
p.mayers at imperial.ac.uk
Tue Jun 11 17:02:23 MDT 2013
On 06/11/2013 11:53 PM, Benjamin Schollnick wrote:
>
> I can't find how to add a ThreadPool to a standard reactor?
I think you might be confused about what ThreadPool does. It doesn't
magically use threads for Twisted work - Twisted is single-threaded, and
does all it's work in one thread (except for adbapi and a few edge cases)
The ThreadPool is for *your* code. It won't do anything unless you call
deferToThreadPool or similar.
> And how can I check or set Keep alive for the TCP connections?
transport.setTcpKeepAlive - see here:
http://twistedmatrix.com/documents/current/api/twisted.internet.interfaces.ITCPTransport.html#setTcpKeepAlive
More information about the Twisted-web
mailing list