Managing greenlets in a group

class gevent.pool.GreenletSet(*args)

Maintain a set of greenlets that are still running.

Links to each item and removes it upon notification.

greenlet_class
alias of Greenlet
add(greenlet)
discard(greenlet)
spawn(*args, **kwargs)
join(timeout=None, raise_error=False)
kill(exception=<class 'greenlet.GreenletExit'>, block=False, timeout=None)
killone(greenlet, exception=<class 'greenlet.GreenletExit'>, block=False, timeout=None)
apply(func, args=None, kwds=None)
Equivalent of the apply() builtin function. It blocks till the result is ready.
apply_async(func, args=None, kwds=None, callback=None)

A variant of the apply() method which returns a Greenlet object.

If callback is specified then it should be a callable which accepts a single argument. When the result becomes ready callback is applied to it (unless the call failed).

map(func, iterable)
map_async(func, iterable, callback=None)

A variant of the map() method which returns a Greenlet object.

If callback is specified then it should be a callable which accepts a single argument.

imap(func, iterable)
An equivalent of itertools.imap()
imap_unordered(func, iterable)
The same as imap() except that the ordering of the results from the returned iterator should be considered arbitrary.
full()
class gevent.pool.Pool(size=None)
full()
free_count()
start(greenlet)
spawn(function, *args, **kwargs)
discard(greenlet)
kill(exception=<class 'greenlet.GreenletExit'>, block=False, timeout=None)

Previous topic

WSGI server based on libevent-http (gevent.wsgi module)

Next topic

Random utilities

This Page