Module Import alias ImportFrom alias ImportFrom alias ImportFrom alias ImportFrom alias ImportFrom alias identifier ImportFrom alias Assign NameStore ListLoad Str Str Assign NameStore NameLoad ClassDef bases NameLoad body Expr Str FunctionDef arguments args NameParam NameParam defaults Num body Assign AttributeStore NameLoad attr NameLoad Assign AttributeStore NameLoad attr Call NameLoad Assign AttributeStore NameLoad attr Call AttributeLoad NameLoad attr NameLoad Assign AttributeStore NameLoad attr Call AttributeLoad NameLoad attr decorator_list FunctionDef arguments args NameParam NameParam defaults body Expr Str Assign NameStore BinOpSub NameLoad AttributeLoad NameLoad attr AugAssignAdd AttributeStore AttributeLoad NameLoad attr attr NameLoad Assign AttributeStore NameLoad attr NameLoad decorator_list FunctionDef arguments args NameParam defaults body Expr Str Return Call NameLoad AttributeLoad NameLoad attr decorator_list FunctionDef arguments args NameParam defaults body Expr Str Return AttributeLoad AttributeLoad NameLoad attr attr decorator_list FunctionDef arguments args NameParam NameParam defaults vararg kwarg body Expr Str Assign NameStore Call AttributeLoad NameLoad attr If BoolOpAnd Call AttributeLoad AttributeLoad NameLoad attr attr CompareIn NameLoad AttributeLoad NameLoad attr body Assign NameStore Call AttributeLoad NameLoad attr NameLoad Expr Call AttributeLoad NameLoad attr NameLoad NameLoad NameLoad Return NameLoad orelse Expr Call AttributeLoad AttributeLoad NameLoad attr attr Assign NameStore Call AttributeLoad NameLoad attr NameLoad NameLoad NameLoad If UnaryOpNot AttributeLoad NameLoad attr body Assign AttributeStore NameLoad attr Call AttributeLoad NameLoad attr Expr Call AttributeLoad AttributeLoad NameLoad attr attr NameLoad Expr Call AttributeLoad NameLoad attr AttributeLoad NameLoad attr Return NameLoad decorator_list FunctionDef arguments args NameParam NameParam NameParam NameParam NameParam defaults body TryFinally body TryExcept body Expr Call NameLoad NameLoad NameLoad handlers ExceptHandler type TupleLoad NameLoad NameLoad AttributeLoad NameLoad attr body Raise ExceptHandler body If NameLoad body Expr Call AttributeLoad NameLoad attr finalbody If CompareIs NameLoad NameLoad body Return orelse Assign NameStore Call AttributeLoad NameLoad attr Expr Call AttributeLoad NameLoad attr NameLoad decorator_list FunctionDef arguments args NameParam NameParam defaults vararg kwarg body Expr Str Assign NameStore Call AttributeLoad NameLoad attr If BoolOpAnd Call AttributeLoad AttributeLoad NameLoad attr attr CompareIn NameLoad AttributeLoad NameLoad attr body Expr Call AttributeLoad NameLoad attr NameLoad NameLoad NameLoad NameLoad orelse Expr Call AttributeLoad AttributeLoad NameLoad attr attr Assign NameStore Call AttributeLoad NameLoad attr AttributeLoad NameLoad attr NameLoad NameLoad NameLoad NameLoad If UnaryOpNot AttributeLoad NameLoad attr body Assign AttributeStore NameLoad attr Call AttributeLoad NameLoad attr Expr Call AttributeLoad AttributeLoad NameLoad attr attr NameLoad decorator_list FunctionDef arguments args NameParam defaults body Expr Str Assert CompareNotIn Call AttributeLoad NameLoad attr AttributeLoad NameLoad attr Str If Call AttributeLoad NameLoad attr body Expr Call AttributeLoad AttributeLoad NameLoad attr attr decorator_list FunctionDef arguments args NameParam NameParam defaults body Expr Call AttributeLoad AttributeLoad NameLoad attr attr If CompareIsNot NameLoad NameLoad body Expr Call AttributeLoad AttributeLoad NameLoad attr attr NameLoad If CompareEq AttributeLoad AttributeLoad NameLoad attr attr AttributeLoad NameLoad attr body Expr Call AttributeLoad AttributeLoad NameLoad attr attr NameLoad decorator_list FunctionDef arguments args NameParam defaults body Expr Str If CompareLt AttributeLoad AttributeLoad NameLoad attr attr Num body Return UnaryOpUSub AttributeLoad AttributeLoad NameLoad attr attr orelse Return Num decorator_list FunctionDef arguments args NameParam NameParam NameParam NameParam defaults body For NameStore NameLoad body Expr Call AttributeLoad NameLoad attr NameLoad NameLoad Expr Call AttributeLoad NameLoad attr NameLoad decorator_list FunctionDef arguments args NameParam NameParam NameParam defaults body Expr Str If CompareIs NameLoad NameLoad body Assign NameStore Lambda arguments args defaults vararg NameLoad Assign NameStore Call NameLoad AttributeLoad NameLoad attr Expr Call AttributeLoad NameLoad attr AttributeLoad NameLoad attr NameLoad NameLoad NameLoad Return NameLoad decorator_list FunctionDef arguments args NameParam NameParam defaults vararg body Expr Str Return Call AttributeLoad NameLoad attr NameLoad Call AttributeLoad AttributeLoad NameLoad attr attr NameLoad decorator_list decorator_list FunctionDef arguments args defaults body Return Call NameLoad decorator_list ClassDef bases NameLoad body Expr Str FunctionDef arguments args NameParam NameParam defaults Num body If Call NameLoad NameLoad NameLoad body Assign AttributeStore NameLoad attr NameLoad orelse Assign AttributeStore NameLoad attr Call NameLoad NameLoad Assign AttributeStore NameLoad attr Call AttributeLoad NameLoad attr Assign AttributeStore NameLoad attr NameLoad Assign AttributeStore NameLoad attr Num decorator_list FunctionDef arguments args NameParam NameParam defaults vararg kwarg body Expr Str Assign AttributeStore NameLoad attr NameLoad AugAssignAdd AttributeStore NameLoad attr Num TryExcept body Assign NameStore Call AttributeLoad AttributeLoad NameLoad attr attr NameLoad NameLoad NameLoad Expr Call AttributeLoad AttributeLoad NameLoad attr attr NameLoad handlers ExceptHandler body AugAssignSub AttributeStore NameLoad attr Num Raise decorator_list FunctionDef arguments args NameParam defaults body Return NameLoad decorator_list FunctionDef arguments args NameParam defaults body Expr Str If BoolOpAnd CompareEq AttributeLoad NameLoad attr Num AttributeLoad NameLoad attr body Raise Call NameLoad TryFinally body Return Call AttributeLoad Call AttributeLoad AttributeLoad NameLoad attr attr attr finalbody AugAssignSub AttributeStore NameLoad attr Num decorator_list Assign NameStore NameLoad decorator_list ClassDef bases NameLoad body FunctionDef arguments args NameParam NameParam defaults body Expr Call AttributeLoad Call NameLoad NameLoad NameLoad attr NameLoad Assign AttributeStore NameLoad attr Call AttributeLoad NameLoad attr keyword AttributeLoad AttributeLoad NameLoad attr attr decorator_list FunctionDef arguments args NameParam defaults body TryFinally body Assign NameStore Call AttributeLoad Call AttributeLoad AttributeLoad NameLoad attr attr attr If Call NameLoad NameLoad NameLoad body Raise NameLoad orelse Return NameLoad finalbody AugAssignSub AttributeStore NameLoad attr Num decorator_list Assign NameStore NameLoad decorator_list
N/A N/A traceback eventlet event eventlet greenthread eventlet queue eventlet semaphore eventlet.support greenlets greenlet eventlet.support six N/A __all__ N/A GreenPool GreenPile N/A DEBUG True GreenPool N/A object N/A N/A The GreenPool class is a pool of green threads.
     __init__ N/A N/A self size N/A 1000 N/A N/A N/A self size size N/A N/A self coroutines_running N/A set N/A N/A self sem N/A N/A semaphore Semaphore size N/A N/A self no_coros_running N/A N/A event Event N/A resize N/A N/A self new_size N/A N/A N/A  Change the max number of greenthreads doing work at any given time.

        If resize is called when there are more than *new_size* greenthreads
        already working on tasks, they will be allowed to complete but no new
        tasks will be allowed to get launched until enough greenthreads finish
        their tasks to drop the overall quantity below *new_size*.  Until
        then, the return value of free() will be negative.
         N/A size_delta N/A new_size N/A self size N/A N/A N/A self sem counter size_delta N/A N/A self size new_size N/A running N/A N/A self N/A N/A N/A  Returns the number of greenthreads that are currently executing
        functions in the GreenPool. N/A N/A len N/A self coroutines_running N/A free N/A N/A self N/A N/A N/A  Returns the number of greenthreads available for use.

        If zero or less, the next call to :meth:`spawn` or :meth:`spawn_n` will
        block the calling greenthread until a slot becomes available. N/A N/A N/A self sem counter N/A spawn N/A N/A self function N/A args kwargs N/A N/A Run the *function* with its arguments in its own green thread.
        Returns the :class:`GreenThread <eventlet.greenthread.GreenThread>`
        object that is running the function, which can be used to retrieve the
        results.

        If the pool is currently at capacity, ``spawn`` will block until one of
        the running greenthreads completes its task and frees up a slot.

        This function is reentrant; *function* can call ``spawn`` on the same
        pool without risk of deadlocking the whole thing.
         N/A current N/A N/A greenthread getcurrent N/A N/A N/A N/A N/A self sem locked N/A current N/A self coroutines_running N/A N/A gt N/A N/A greenthread GreenThread current N/A N/A N/A gt main function args kwargs N/A gt N/A N/A N/A N/A N/A self sem acquire N/A gt N/A N/A greenthread spawn function args kwargs N/A N/A N/A self coroutines_running N/A N/A N/A self no_coros_running N/A N/A event Event N/A N/A N/A N/A self coroutines_running add gt N/A N/A N/A gt link N/A self _spawn_done N/A gt N/A _spawn_n_impl N/A N/A self func args kwargs coro N/A N/A N/A N/A N/A N/A N/A N/A func args kwargs N/A N/A N/A N/A KeyboardInterrupt SystemExit N/A greenlet GreenletExit N/A N/A N/A N/A N/A DEBUG N/A N/A N/A N/A traceback print_exc N/A N/A N/A coro None N/A N/A N/A N/A coro N/A N/A greenthread getcurrent N/A N/A N/A self _spawn_done coro N/A spawn_n N/A N/A self function N/A args kwargs N/A N/A Create a greenthread to run the *function*, the same as
        :meth:`spawn`.  The difference is that :meth:`spawn_n` returns
        None; the results of *function* are not retrievable.
         N/A current N/A N/A greenthread getcurrent N/A N/A N/A N/A N/A self sem locked N/A current N/A self coroutines_running N/A N/A N/A N/A self _spawn_n_impl function args kwargs None N/A N/A N/A N/A N/A self sem acquire N/A g N/A N/A greenthread spawn_n N/A self _spawn_n_impl function args kwargs True N/A N/A N/A self coroutines_running N/A N/A N/A self no_coros_running N/A N/A event Event N/A N/A N/A N/A self coroutines_running add g N/A waitall N/A N/A self N/A N/A N/A Waits until all greenthreads in the pool are finished working. N/A N/A N/A N/A greenthread getcurrent N/A self coroutines_running Calling waitall() from within one of the GreenPool's greenthreads will never terminate. N/A N/A N/A self running N/A N/A N/A N/A N/A self no_coros_running wait N/A _spawn_done N/A N/A self coro N/A N/A N/A N/A N/A N/A self sem release N/A N/A coro None N/A N/A N/A N/A N/A self coroutines_running remove coro N/A N/A N/A N/A self sem balance N/A self size N/A N/A N/A N/A N/A self no_coros_running send None N/A waiting N/A N/A self N/A N/A N/A Return the number of greenthreads waiting to spawn.
         N/A N/A N/A N/A self sem balance 0 N/A N/A N/A N/A N/A self sem balance N/A N/A 0 N/A _do_map N/A N/A self func it gi N/A N/A N/A args it N/A N/A N/A N/A gi spawn func args N/A N/A N/A gi spawn return_stop_iteration N/A starmap N/A N/A self function iterable N/A N/A N/A This is the same as :func:`itertools.starmap`, except that *func* is
        executed in a separate green thread for each item, with the concurrency
        limited by the pool's size. In operation, starmap consumes a constant
        amount of memory, proportional to the size of the pool, and is thus
        suited for iterating over extremely long input lists.
         N/A N/A function None N/A N/A function N/A N/A N/A N/A a a N/A gi N/A GreenMap N/A self size N/A N/A N/A greenthread spawn_n N/A self _do_map function iterable gi N/A gi N/A imap N/A N/A self function N/A iterables N/A N/A This is the same as :func:`itertools.imap`, and has the same
        concurrency and memory behavior as :meth:`starmap`.

        It's quite convenient for, e.g., farming out jobs from a file::

           def worker(line):
               return do_something(line)
           pool = GreenPool()
           for result in pool.imap(worker, open("filename", 'r')):
               print(result)
         N/A N/A N/A self starmap function N/A N/A N/A six moves zip iterables N/A N/A return_stop_iteration N/A N/A N/A N/A N/A N/A StopIteration N/A GreenPile N/A object N/A N/A GreenPile is an abstraction representing a bunch of I/O-related tasks.

    Construct a GreenPile with an existing GreenPool object.  The GreenPile will
    then use that pool's concurrency as it processes its jobs.  There can be
    many GreenPiles associated with a single GreenPool.

    A GreenPile can also be constructed standalone, not associated with any
    GreenPool.  To do this, construct it with an integer size parameter instead
    of a GreenPool.

    It is not advisable to iterate over a GreenPile in a different greenthread
    than the one which is calling spawn.  The iterator will exit early in that
    situation.
     __init__ N/A N/A self size_or_pool N/A 1000 N/A N/A N/A isinstance size_or_pool GreenPool N/A N/A N/A self pool size_or_pool N/A N/A N/A self pool N/A GreenPool size_or_pool N/A N/A self waiters N/A N/A queue LightQueue N/A N/A self used False N/A N/A self counter 0 N/A spawn N/A N/A self func N/A args kw N/A N/A Runs *func* in its own green thread, with the result available by
        iterating over the GreenPile object. N/A N/A self used True N/A N/A self counter 1 N/A N/A N/A gt N/A N/A N/A self pool spawn func args kw N/A N/A N/A N/A self waiters put gt N/A N/A N/A N/A N/A self counter 1 N/A N/A __iter__ N/A N/A self N/A N/A N/A self N/A next N/A N/A self N/A N/A N/A Wait for the next result, suspending the current greenthread until it
        is available.  Raises StopIteration when there are no more results. N/A N/A N/A N/A self counter 0 N/A self used N/A N/A N/A StopIteration N/A N/A N/A N/A N/A N/A N/A N/A self waiters get wait N/A N/A N/A self counter 1 N/A N/A __next__ next N/A GreenMap N/A GreenPile N/A __init__ N/A N/A self size_or_pool N/A N/A N/A N/A N/A N/A super GreenMap self __init__ size_or_pool N/A N/A self waiters N/A N/A queue LightQueue maxsize N/A N/A self pool size N/A next N/A N/A self N/A N/A N/A N/A N/A val N/A N/A N/A N/A N/A self waiters get wait N/A N/A isinstance val StopIteration N/A N/A val N/A N/A val N/A N/A N/A self counter 1 N/A N/A __next__ next N/A