| Home | Trees | Indices | Help |
|---|
|
|
object --+
|
pool.PoolInterface --+
|
GeventPool
Eventlet pool to manage connections. after a specific timeout the sockets are closes. Default timeout is 300s.
To use restkit with Gevent:
>>> from restkit import *
>>> from gevent import monkey; monkey.patch_socket()
>>> from restkit.ext.gevent_pool import GeventPool
>>> pool = GeventPool(max_connections=5)
>>> r = request('http://friendpaste.com', pool_instance=pool)
|
|||
|
|||
|
|||
|
|||
|
|||
|
|||
|
|||
|
|||
|
Inherited from Inherited from |
|||
|
|||
|
Inherited from |
|||
|
|||
Initialize EventletPool :param max_connexions: int, number max of connections in the pool. Default is 4 :param timeout: int, number max of second a connection is kept alive. Default is 300s.
|
Get connection for (Host, Port) address :param address: tuple (Host, address)
|
release socket in the pool :param address: tuple (Host, address) :param socket: a socket object
|
close all sockets in the pool for this address :param address: tuple (Host, address) |
| Home | Trees | Indices | Help |
|---|
| Generated by Epydoc 3.0.1 on Mon Mar 8 08:52:45 2010 | http://epydoc.sourceforge.net |