Package wsgiwapi :: Package cpwsgiserver :: Class ThreadPool
[frames] | no frames]

Class ThreadPool

source code

object --+
         |
        ThreadPool

A Request Queue for the CherryPyWSGIServer which pools threads.

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

Instance Methods
 
__init__(self, server, min=10, max=-1)
x.__init__(...) initializes x; see x.__class__.__doc__ for signature
source code
 
start(self)
Start the pool of threads.
source code
 
put(self, obj) source code
 
grow(self, amount)
Spawn new worker threads (not above self.max).
source code
 
shrink(self, amount)
Kill off worker threads (not below self.min).
source code
 
stop(self, timeout=5) source code

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

Class Variables
  idle = property(_get_idle, doc= _get_idle.__doc__)
Properties

Inherited from object: __class__

Method Details

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

source code 

x.__init__(...) initializes x; see x.__class__.__doc__ for signature

Overrides: object.__init__
(inherited documentation)