Package cherrypy :: Package wsgiserver :: Module wsgiserver3 :: Class ThreadPool
[hide private]
[frames] | no frames]

Class ThreadPool

source code

object --+
         |
        ThreadPool

A Request Queue for an HTTPServer which pools threads.

ThreadPool objects must provide min, get(), put(obj), start() and stop(timeout) attributes.

Instance Methods [hide private]
 
__init__(self, server, min=10, max=-1)
x.__init__(...) initializes x; see help(type(x)) for signature
source code
 
start(self)
Start the pool of threads.
source code
 
_get_idle(self)
Number of worker threads which are idle.
source code
 
put(self, obj) source code
 
grow(self, amount)
Spawn new worker threads (not above self.max).
source code
 
_spawn_worker(self) source code
 
shrink(self, amount)
Kill off worker threads (not below self.min).
source code
 
stop(self, timeout=5) source code
 
_get_qsize(self) source code

Inherited from object: __delattr__, __format__, __getattribute__, __hash__, __new__, __reduce__, __reduce_ex__, __repr__, __setattr__, __sizeof__, __str__, __subclasshook__

Properties [hide private]
  idle
Number of worker threads which are idle.
  qsize

Inherited from object: __class__

Method Details [hide private]

__init__(self, server, min=10, max=-1)
(Constructor)

source code 

x.__init__(...) initializes x; see help(type(x)) for signature

Overrides: object.__init__
(inherited documentation)

_get_idle(self)

source code 

Number of worker threads which are idle. Read-only.


Property Details [hide private]

idle

Number of worker threads which are idle. Read-only.

Get Method:
_get_idle(self) - Number of worker threads which are idle.

qsize

Get Method:
_get_qsize(self)