[Twisted-web] twisted web / reactor.callInThread()

Christopher Armstrong radeex at gmail.com
Sat May 21 02:24:18 MDT 2005

On 5/21/05, Andreas De Stefani <andreas.destefani at ucd.ie> wrote:
> I am using reactor.callInThread(methodname, args ...) to start a
> function in a new thread from a twisted web application. Today i got
> problems with my server, and when i looked at the currently running
> processes there where about 50 twisted processes running, some of them
> where days/weeks old.
> I increased the Threadpoolsize previously with the command
> reactor.suggestThreadPoolSize(50)
> to 50 in order to have more parallel executions...
> Could it be that some of the threads didnt get terminated and cleaned up
> correctly, or are the processes just visible because the threadPoolSize
> was set as high? ...I'm almost sure my function terminates correctly...
> any help or information about this behaviour would be appreciated

Well, it is a thread _pool_, that is, it keeps a pool of threads
around to do work whenever it's asked. So suggesting 50 will mean it
can get as high as 50, and as low as the minimum (whatever that's set

  Twisted   |  Christopher Armstrong: International Man of Twistery
   Radix    |    -- http://radix.twistedmatrix.com
            |  Release Manager, Twisted Project
  \\\V///   |    -- http://twistedmatrix.com
   |o O|    |  Founding Member, Hobart Hacking Society
w----v----w-+    -- http://hackingsociety.org/chapters/hash

More information about the Twisted-web mailing list