Package web2py :: Package gluon :: Module wsgiserver :: Class ThreadPool
[hide private]
[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 [hide private]
 
__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
 
_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
 
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__

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

Inherited from object: __class__

Method Details [hide private]

__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)

_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.