Module ImportFrom alias ImportFrom alias identifier Assign NameStore ListLoad Str ClassDef bases body FunctionDef arguments args NameParam defaults body Return Str decorator_list decorator_list Assign NameStore Call NameLoad ClassDef bases NameLoad body Expr Str Assign NameStore NameLoad Assign NameStore NameLoad FunctionDef arguments args NameParam defaults body Assign AttributeStore NameLoad attr Call NameLoad Expr Call AttributeLoad NameLoad attr decorator_list FunctionDef arguments args NameParam defaults body Assign NameStore TupleLoad AttributeLoad AttributeLoad NameLoad attr attr Call NameLoad Call NameLoad NameLoad AttributeLoad NameLoad attr AttributeLoad NameLoad attr Call NameLoad AttributeLoad NameLoad attr Return BinOpMod Str NameLoad decorator_list FunctionDef arguments args NameParam defaults body Assert CompareIsNot AttributeLoad NameLoad attr NameLoad Str Assign AttributeStore NameLoad attr NameLoad Assign AttributeStore NameLoad attr NameLoad decorator_list FunctionDef arguments args NameParam defaults body Expr Str Return CompareIsNot AttributeLoad NameLoad attr NameLoad decorator_list FunctionDef arguments args NameParam defaults body Return CompareIsNot AttributeLoad NameLoad attr NameLoad decorator_list FunctionDef arguments args NameParam defaults body Return BoolOpAnd CompareIsNot AttributeLoad NameLoad attr NameLoad CompareIs AttributeLoad NameLoad attr NameLoad decorator_list FunctionDef arguments args NameParam NameParam defaults NameLoad body If Call AttributeLoad NameLoad attr body Return Call AttributeLoad NameLoad attr Return NameLoad decorator_list FunctionDef arguments args NameParam NameParam defaults NameLoad body If Call AttributeLoad NameLoad attr body Return Call AttributeLoad NameLoad attr Return NameLoad decorator_list FunctionDef arguments args NameParam NameParam defaults NameLoad body If Call AttributeLoad NameLoad attr body Return Call AttributeLoad NameLoad attr Return NameLoad decorator_list FunctionDef arguments args NameParam defaults body Expr Str Assign NameStore Call AttributeLoad NameLoad attr If CompareIs AttributeLoad NameLoad attr NameLoad body Expr Call AttributeLoad AttributeLoad NameLoad attr attr NameLoad TryFinally body Return Call AttributeLoad Call AttributeLoad NameLoad attr attr finalbody Expr Call AttributeLoad AttributeLoad NameLoad attr attr NameLoad If CompareIsNot AttributeLoad NameLoad attr NameLoad body Expr Call AttributeLoad NameLoad attr AttributeLoad NameLoad attr Return AttributeLoad NameLoad attr decorator_list FunctionDef arguments args NameParam NameParam NameParam defaults NameLoad NameLoad body Expr Str Assert CompareIs AttributeLoad NameLoad attr NameLoad Str Assign AttributeStore NameLoad attr NameLoad If BoolOpAnd CompareIsNot NameLoad NameLoad UnaryOpNot Call NameLoad NameLoad NameLoad body Assign NameStore TupleLoad NameLoad Assign AttributeStore NameLoad attr NameLoad Assign NameStore Call AttributeLoad NameLoad attr If AttributeLoad NameLoad attr body Expr Call AttributeLoad NameLoad attr Num AttributeLoad NameLoad attr AttributeLoad NameLoad attr AttributeLoad NameLoad attr Call AttributeLoad AttributeLoad NameLoad attr attr decorator_list FunctionDef arguments args NameParam NameParam NameParam NameParam defaults body While NameLoad body Assign NameStore Call AttributeLoad NameLoad attr If CompareIn NameLoad AttributeLoad NameLoad attr body If CompareIs NameLoad NameLoad body Expr Call AttributeLoad NameLoad attr NameLoad orelse Expr Call AttributeLoad NameLoad attr NameLoad decorator_list FunctionDef arguments args NameParam defaults vararg body Expr Str Return Call AttributeLoad NameLoad attr NameLoad NameLoad decorator_list decorator_list
N/A eventlet hubs eventlet.support greenlets greenlet N/A __all__ N/A Event NOT_USED N/A N/A __repr__ N/A N/A self N/A N/A N/A NOT_USED N/A N/A N/A NOT_USED N/A NOT_USED Event N/A object N/A N/A An abstraction where an arbitrary number of coroutines
    can wait for one event from another.

    Events are similar to a Queue that can only hold one item, but differ
    in two important ways:

    1. calling :meth:`send` never unschedules the current greenthread
    2. :meth:`send` can only be called once; create a new event to send again.

    They are good for communicating results between coroutines, and
    are the basis for how
    :meth:`GreenThread.wait() <eventlet.greenthread.GreenThread.wait>`
    is implemented.

    >>> from eventlet import event
    >>> import eventlet
    >>> evt = event.Event()
    >>> def baz(b):
    ...     evt.send(b + 1)
    ...
    >>> _ = eventlet.spawn_n(baz, 3)
    >>> evt.wait()
    4
     N/A _result None N/A _exc None __init__ N/A N/A self N/A N/A N/A N/A self _waiters N/A set N/A N/A N/A self reset N/A __str__ N/A N/A self N/A N/A N/A params N/A N/A N/A self __class__ __name__ N/A hex N/A id self N/A self _result N/A self _exc N/A len N/A self _waiters N/A N/A <%s at %s result=%r _exc=%r _waiters[%d]> params N/A reset N/A N/A self N/A N/A N/A N/A N/A self _result NOT_USED Trying to re-reset() a fresh event. N/A N/A self _result NOT_USED N/A N/A self _exc None N/A ready N/A N/A self N/A N/A N/A  Return true if the :meth:`wait` call will return immediately.
        Used to avoid waiting for things that might take a while to time out.
        For example, you can put a bunch of events into a list, and then visit
        them all repeatedly, calling :meth:`ready` until one returns ``True``,
        and then you can :meth:`wait` on that one. N/A N/A N/A self _result NOT_USED N/A has_exception N/A N/A self N/A N/A N/A N/A N/A self _exc None N/A has_result N/A N/A self N/A N/A N/A N/A N/A N/A self _result NOT_USED N/A N/A self _exc None N/A poll N/A N/A self notready N/A None N/A N/A N/A N/A self ready N/A N/A N/A N/A self wait N/A notready N/A poll_exception N/A N/A self notready N/A None N/A N/A N/A N/A self has_exception N/A N/A N/A N/A self wait N/A notready N/A poll_result N/A N/A self notready N/A None N/A N/A N/A N/A self has_result N/A N/A N/A N/A self wait N/A notready N/A wait N/A N/A self N/A N/A N/A Wait until another coroutine calls :meth:`send`.
        Returns the value the other coroutine passed to
        :meth:`send`.

        >>> from eventlet import event
        >>> import eventlet
        >>> evt = event.Event()
        >>> def wait_on():
        ...    retval = evt.wait()
        ...    print "waited for", retval
        >>> _ = eventlet.spawn(wait_on)
        >>> evt.send('result')
        >>> eventlet.sleep(0)
        waited for result

        Returns immediately if the event has already
        occured.

        >>> evt.wait()
        'result'
         N/A current N/A N/A greenlet getcurrent N/A N/A N/A self _result NOT_USED N/A N/A N/A N/A N/A self _waiters add current N/A N/A N/A N/A N/A N/A N/A hubs get_hub switch N/A N/A N/A N/A N/A self _waiters discard current N/A N/A N/A self _exc None N/A N/A N/A N/A current throw N/A self _exc N/A N/A self _result N/A send N/A N/A self result exc N/A None None N/A N/A Makes arrangements for the waiters to be woken with the
        result and then returns immediately to the parent.

        >>> from eventlet import event
        >>> import eventlet
        >>> evt = event.Event()
        >>> def waiter():
        ...     print 'about to wait'
        ...     result = evt.wait()
        ...     print 'waited for', result
        >>> _ = eventlet.spawn(waiter)
        >>> eventlet.sleep(0)
        about to wait
        >>> evt.send('a')
        >>> eventlet.sleep(0)
        waited for a

        It is an error to call :meth:`send` multiple times on the same event.

        >>> evt.send('whoops')
        Traceback (most recent call last):
        ...
        AssertionError: Trying to re-send() an already-triggered event.

        Use :meth:`reset` between :meth:`send` s to reuse an event object.
         N/A N/A N/A self _result NOT_USED Trying to re-send() an already-triggered event. N/A N/A self _result result N/A N/A N/A exc None N/A N/A isinstance exc tuple N/A N/A exc N/A exc N/A N/A self _exc exc N/A hub N/A N/A hubs get_hub N/A N/A self _waiters N/A N/A N/A N/A hub schedule_call_global 0 N/A self _do_send N/A self _result N/A self _exc N/A N/A N/A self _waiters copy N/A _do_send N/A N/A self result exc waiters N/A N/A N/A waiters N/A N/A waiter N/A N/A waiters pop N/A N/A waiter N/A self _waiters N/A N/A N/A exc None N/A N/A N/A N/A waiter switch result N/A N/A N/A N/A waiter throw exc N/A send_exception N/A N/A self N/A args N/A N/A Same as :meth:`send`, but sends an exception to waiters. N/A N/A N/A self send None args N/A N/A