gevent.threadpool

class gevent.threadpool.ThreadPool(maxsize, hub=None)
maxsize
size
join()
kill()
adjust()
spawn(func, *args, **kwargs)
apply_e(expected_errors, function, args=None, kwargs=None)
apply(func, args=None, kwds=None)

Equivalent of the apply() builtin function. It blocks till the result is ready.

apply_cb(func, args=None, kwds=None, callback=None)
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_cb(func, iterable, callback=None)
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 in arbitrary order.

class gevent.threadpool.ThreadResult(receiver, hub=None)
set(value)
handle_error(context, exc_info)
successful()

Navigation

Related pages