Re: Connection Pool?
Phil Mayers <[email protected]> Wed, 12 Jun 2013 00:02:23 +0100
| Newsgroups | gmane.comp.python.twisted.web |
|---|---|
| Message-ID | <[email protected]> |
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