Module Import alias Import alias Import alias Import alias Import alias Import alias Import alias Import alias Import alias Import alias Import alias Import alias Import alias Import alias Import alias Import alias Import alias ImportFrom alias ImportFrom alias Assign NameStore Call AttributeLoad NameLoad attr If Call NameLoad NameLoad Str body Assign NameStore AttributeLoad NameLoad attr orelse If CompareEq Call AttributeLoad NameLoad attr Str body Assign NameStore AttributeLoad NameLoad attr orelse Assign NameStore AttributeLoad NameLoad attr ClassDef bases AttributeLoad NameLoad attr body Expr Str FunctionDef arguments args NameParam NameParam defaults vararg kwarg body Expr Call AttributeLoad Call NameLoad NameLoad NameLoad attr NameLoad NameLoad NameLoad Assign NameStore AttributeStore NameLoad attr Call AttributeLoad NameLoad attr Call AttributeLoad NameLoad attr If UnaryOpNot Call NameLoad NameLoad Str body Assign AttributeStore NameLoad attr Dict Assign AttributeStore NameLoad attr AttributeLoad NameLoad attr Assign NameStore ListLoad Assign NameStore Call AttributeLoad NameLoad attr While NameLoad body Expr Call AttributeLoad NameLoad attr TupleLoad AttributeLoad NameLoad attr AttributeLoad NameLoad attr Assign NameStore AttributeLoad NameLoad attr Assign AttributeStore NameLoad attr BinOpAdd TupleLoad Call NameLoad NameLoad SubscriptLoad Call NameLoad NameLoad Str TupleLoad Slice Num decorator_list decorator_list FunctionDef arguments args NameParam defaults body Expr Str Assign NameStore Call NameLoad Call AttributeLoad NameLoad attr Str NameLoad If NameLoad body Return Call AttributeLoad NameLoad attr NameLoad Return NameLoad decorator_list FunctionDef arguments args NameParam NameParam defaults body Expr Str Assign NameStore Call AttributeLoad NameLoad attr If UnaryOpNot Call NameLoad NameLoad Str body Assign AttributeStore NameLoad attr Dict Assign SubscriptStore AttributeLoad NameLoad attr Index NameLoad NameLoad decorator_list FunctionDef arguments args NameParam defaults body Expr Str Assign NameStore Call NameLoad Call AttributeLoad NameLoad attr Str NameLoad If NameLoad body Delete SubscriptDel NameLoad Index NameLoad decorator_list FunctionDef arguments args NameParam defaults vararg kwarg body Expr Str Assign NameStore Call AttributeLoad NameLoad attr Assign NameStore Call AttributeLoad AttributeLoad NameLoad attr attr Expr Call AttributeLoad NameLoad attr FunctionDef arguments args NameParam defaults body If Call AttributeLoad NameLoad attr body Expr Call AttributeLoad NameLoad attr decorator_list If CompareIn Str NameLoad body Assign NameStore Call AttributeLoad NameLoad attr Str orelse Assign NameStore ListLoad Num Num Num Num If CompareGt SubscriptLoad NameLoad Index Num Num body Expr Call AttributeLoad NameLoad attr Num Num Assign NameStore Call AttributeLoad NameLoad attr NameLoad NameLoad NameLoad Expr Call AttributeLoad NameLoad attr NameLoad Assign NameStore ListLoad NameLoad For NameStore Call NameLoad Num Call NameLoad NameLoad body Assign NameStore BinOpSub SubscriptLoad NameLoad Index NameLoad SubscriptLoad NameLoad Index BinOpSub NameLoad Num If AttributeLoad NameLoad attr body Assign NameStore BinOpMult NameLoad Num Expr Call AttributeLoad NameLoad attr Str NameLoad TryExcept body With Call AttributeLoad NameLoad attr NameLoad body Expr Call AttributeLoad NameLoad attr Break handlers ExceptHandler type AttributeLoad NameLoad attr body Expr Call AttributeLoad NameLoad attr Str Assign NameStore Call AttributeLoad AttributeLoad NameLoad attr attr Str AttributeLoad NameLoad attr Expr Call AttributeLoad NameLoad attr Str keyword NameLoad Assign NameStore Call AttributeLoad NameLoad attr NameLoad NameLoad NameLoad Expr Call AttributeLoad NameLoad attr NameLoad Expr Call AttributeLoad NameLoad attr NameLoad Assign NameStore ListComp AttributeLoad NameLoad attr comprehension NameStore NameLoad Call AttributeLoad NameLoad attr For NameStore NameLoad body Expr Call AttributeLoad NameLoad attr If NameLoad body Return SubscriptLoad NameLoad Index Num orelse Return NameLoad decorator_list FunctionDef arguments args NameParam defaults body Expr Str Assign NameStore BoolOpOr Call AttributeLoad AttributeLoad NameLoad attr attr AttributeLoad AttributeLoad NameLoad attr attr Str Assign NameStore Call NameLoad AttributeLoad AttributeLoad NameLoad attr attr Assign NameStore Call AttributeLoad Str attr AttributeLoad NameLoad attr NameLoad NameLoad FunctionDef arguments args defaults vararg kwarg body Assign NameStore Call AttributeLoad NameLoad attr Assign NameStore Call NameLoad NameLoad NameLoad Expr Call AttributeLoad SubscriptLoad AttributeLoad Call AttributeLoad NameLoad attr attr Index NameLoad attr BinOpDiv BinOpSub Call AttributeLoad NameLoad attr NameLoad Num Return NameLoad decorator_list Call AttributeLoad NameLoad attr NameLoad Return NameLoad decorator_list ClassDef bases NameLoad body FunctionDef arguments args NameParam NameParam NameParam defaults body Assign AttributeStore NameLoad attr NameLoad Assign AttributeStore NameLoad attr NameLoad decorator_list FunctionDef arguments args NameParam NameParam defaults body FunctionDef arguments args defaults vararg kwarg body Assign NameStore Call NameLoad Assign NameStore Call AttributeLoad NameLoad attr Assign NameStore ListLoad FunctionDef arguments args defaults vararg kwarg body Expr Call AttributeLoad NameLoad attr Str AttributeLoad NameLoad attr Expr Call AttributeLoad NameLoad attr Call NameLoad Return Call NameLoad NameLoad NameLoad decorator_list If BoolOpOr UnaryOpNot AttributeLoad NameLoad attr Call AttributeLoad NameLoad attr body Assign NameStore Call NameLoad NameLoad NameLoad orelse If CompareIs Call NameLoad AttributeLoad NameLoad attr body Assign NameStore Call NameLoad NameLoad NameLoad orelse Expr Call AttributeLoad SubscriptLoad AttributeLoad NameLoad attr Index BinOpAdd AttributeLoad NameLoad attr Str attr BinOpAdd Num Call NameLoad AttributeLoad NameLoad attr Assign NameStore Call AttributeLoad AttributeLoad NameLoad attr attr TupleLoad NameLoad NameLoad NameLoad NameLoad Expr Call AttributeLoad NameLoad attr Str AttributeLoad NameLoad attr Call NameLoad NameLoad Assign NameStore SubscriptLoad NameLoad Index Num Assign NameStore BinOpSub Call NameLoad NameLoad Assign NameStore BinOpSub NameLoad NameLoad If BoolOpAnd Call NameLoad NameLoad Str Call NameLoad AttributeLoad NameLoad attr body Assign NameStore Call AttributeLoad NameLoad attr orelse If BoolOpAnd NameLoad Call NameLoad SubscriptLoad NameLoad Index Num Str Call NameLoad AttributeLoad SubscriptLoad NameLoad Index Num attr body Assign NameStore Call AttributeLoad SubscriptLoad NameLoad Index Num attr orelse Assign NameStore NameLoad Expr Call NameLoad NameLoad AttributeLoad NameLoad attr NameLoad NameLoad NameLoad Return NameLoad decorator_list Call AttributeLoad NameLoad attr NameLoad Assign AttributeStore NameLoad attr NameLoad Return NameLoad decorator_list decorator_list FunctionDef arguments args defaults body Expr Str Assign NameStore Call AttributeLoad NameLoad attr While AttributeLoad NameLoad attr body Assign NameStore AttributeLoad NameLoad attr Assign NameStore Call AttributeLoad AttributeLoad NameLoad attr attr Str If BoolOpAnd Call NameLoad NameLoad AttributeLoad AttributeLoad NameLoad attr attr CompareIs AttributeLoad NameLoad attr Call NameLoad Call NameLoad AttributeLoad NameLoad attr Str Str body Return NameLoad Return NameLoad decorator_list ClassDef bases NameLoad body Expr Str FunctionDef arguments args NameParam defaults body Assign AttributeStore NameLoad attr Call AttributeLoad NameLoad attr Assign AttributeStore NameLoad attr Call AttributeLoad NameLoad attr Assign AttributeStore NameLoad attr NameLoad Assign AttributeStore NameLoad attr Call AttributeLoad AttributeLoad Call AttributeLoad NameLoad attr attr attr Assign AttributeStore NameLoad attr Call AttributeLoad AttributeLoad NameLoad attr attr Expr Call AttributeLoad AttributeLoad NameLoad attr attr AttributeLoad AttributeLoad NameLoad attr attr Assign AttributeStore NameLoad attr Call AttributeLoad NameLoad attr keyword AttributeLoad NameLoad attr Assign AttributeStore AttributeLoad NameLoad attr attr NameLoad Assign AttributeStore NameLoad attr NameLoad Assign AttributeStore NameLoad attr Dict Expr Call AttributeLoad AttributeLoad NameLoad attr attr Assign AttributeStore NameLoad attr Call AttributeLoad NameLoad attr AttributeLoad NameLoad attr decorator_list FunctionDef arguments args NameParam defaults body Assign AttributeStore AttributeLoad Call AttributeLoad NameLoad attr attr attr NameLoad TryExcept body Assign AttributeStore NameLoad attr Call AttributeLoad AttributeLoad Call AttributeLoad NameLoad attr attr attr Assign AttributeStore NameLoad attr Call AttributeLoad AttributeLoad NameLoad attr attr Expr Call AttributeLoad AttributeLoad NameLoad attr attr AttributeLoad AttributeLoad NameLoad attr attr While UnaryOpNot AttributeLoad NameLoad attr body If UnaryOpNot AttributeLoad NameLoad attr body Expr Call AttributeLoad AttributeLoad NameLoad attr attr Expr Call AttributeLoad AttributeLoad NameLoad attr attr Continue Assign TupleStore NameStore NameStore NameStore NameStore NameStore Call AttributeLoad AttributeLoad NameLoad attr attr Assign NameStore Call NameLoad TryExcept body Assign NameStore SubscriptStore AttributeLoad NameLoad attr Index NameLoad Call NameLoad NameLoad NameLoad handlers ExceptHandler type NameLoad name NameStore body Assign NameStore SubscriptStore AttributeLoad NameLoad attr Index NameLoad Call AttributeLoad NameLoad attr NameLoad Expr Call AttributeLoad AttributeLoad NameLoad attr attr NameLoad Expr Call AttributeLoad AttributeLoad NameLoad attr attr Assign TupleStore NameStore NameStore TupleLoad BinOpSub NameLoad NameLoad BinOpSub Call NameLoad NameLoad Assign NameStore NameLoad If BoolOpAnd Call NameLoad NameLoad Str Call NameLoad AttributeLoad NameLoad attr body Assign NameStore Call NameLoad NameLoad Expr Call NameLoad Str AttributeLoad NameLoad attr NameLoad NameLoad NameLoad handlers ExceptHandler body Expr Call AttributeLoad NameLoad attr decorator_list FunctionDef arguments args NameParam NameParam NameParam NameParam defaults body Assign NameStore Call AttributeLoad AttributeLoad NameLoad attr attr Expr Call AttributeLoad AttributeLoad NameLoad attr attr TupleLoad NameLoad NameLoad NameLoad NameLoad Call NameLoad Expr Call AttributeLoad SubscriptLoad AttributeLoad Call AttributeLoad NameLoad attr attr Index Str attr BinOpAdd Num Call NameLoad AttributeLoad NameLoad attr While UnaryOpNot AttributeLoad NameLoad attr body Expr Call AttributeLoad NameLoad attr Num Expr Call AttributeLoad AttributeLoad NameLoad attr attr Expr Call AttributeLoad NameLoad attr Assign NameStore SubscriptLoad AttributeLoad NameLoad attr Index NameLoad Delete SubscriptDel AttributeLoad NameLoad attr Index NameLoad If Call NameLoad NameLoad AttributeLoad NameLoad attr body Raise AttributeLoad NameLoad attr Return NameLoad decorator_list FunctionDef arguments args NameParam defaults body TryExcept body While UnaryOpNot AttributeLoad NameLoad attr body If UnaryOpNot AttributeLoad NameLoad attr body Expr Call AttributeLoad AttributeLoad NameLoad attr attr Expr Call AttributeLoad AttributeLoad NameLoad attr attr Continue Expr Call AttributeLoad Call AttributeLoad AttributeLoad NameLoad attr attr attr handlers ExceptHandler body Expr Call AttributeLoad NameLoad attr decorator_list ClassDef bases NameLoad body FunctionDef arguments args NameParam NameParam defaults body Assign AttributeStore NameLoad attr NameLoad decorator_list decorator_list FunctionDef arguments args NameParam defaults body Assign NameStore AttributeLoad AttributeLoad NameLoad attr attr Return BinOpMod Str TupleLoad NameLoad Call NameLoad NameLoad Call NameLoad AttributeLoad NameLoad attr Call NameLoad AttributeLoad NameLoad attr decorator_list FunctionDef arguments args NameParam defaults body Import alias Expr Call AttributeLoad NameLoad attr Assign NameStore Call AttributeLoad NameLoad attr Assign NameStore AttributeLoad NameLoad attr If BoolOpAnd Call NameLoad NameLoad Str CompareIs AttributeLoad NameLoad attr NameLoad body Delete AttributeDel NameLoad attr decorator_list decorator_list FunctionDef arguments args NameParam NameParam NameParam NameParam NameParam defaults NameLoad body Assign NameStore Call AttributeLoad NameLoad attr Assign NameStore BinOpAdd BinOpAdd NameLoad Str NameLoad Expr Call AttributeLoad SubscriptLoad AttributeLoad NameLoad attr Index BinOpAdd NameLoad Str attr BinOpMult NameLoad Num Expr Call AttributeLoad SubscriptLoad AttributeLoad NameLoad attr Index BinOpAdd NameLoad Str attr BinOpMult NameLoad Num Expr Call AttributeLoad SubscriptLoad AttributeLoad NameLoad attr Index BinOpAdd NameLoad Str attr BinOpMult NameLoad Num Expr Call AttributeLoad SubscriptLoad AttributeLoad NameLoad attr Index BinOpAdd NameLoad Str attr BinOpMult NameLoad Num If CompareIsNot NameLoad NameLoad body Expr Call AttributeLoad SubscriptLoad AttributeLoad NameLoad attr Index BinOpAdd NameLoad Str attr NameLoad If NameLoad body Expr Call AttributeLoad SubscriptLoad AttributeLoad NameLoad attr Index BinOpAdd NameLoad Str attr BinOpDiv NameLoad BinOpMult NameLoad Num decorator_list Assign NameStore Call NameLoad Call AttributeLoad AttributeLoad NameLoad attr attr Num Str FunctionDef arguments args NameParam NameParam defaults NameLoad body Expr Str FunctionDef arguments args defaults vararg kwarg body Assign NameStore Call AttributeLoad NameLoad attr If BoolOpOr UnaryOpNot AttributeLoad NameLoad attr Call AttributeLoad NameLoad attr Call NameLoad AttributeLoad NameLoad attr Str NameLoad body Return Call NameLoad NameLoad NameLoad If UnaryOpNot Call NameLoad AttributeLoad NameLoad attr Str body Assign AttributeStore AttributeLoad NameLoad attr attr Call NameLoad Expr Call AttributeLoad NameLoad attr Str AttributeLoad NameLoad attr Return Call AttributeLoad AttributeLoad AttributeLoad NameLoad attr attr attr NameLoad NameLoad NameLoad decorator_list Call AttributeLoad NameLoad attr NameLoad Assign AttributeStore NameLoad attr NameLoad Return NameLoad decorator_list FunctionDef arguments args NameParam defaults body Expr Str FunctionDef arguments args NameParam defaults body Assign NameStore Call NameLoad NameLoad FunctionDef arguments args defaults vararg kwarg body If Call NameLoad NameLoad NameLoad body Return Call NameLoad NameLoad NameLoad Return Call AttributeLoad NameLoad attr NameLoad NameLoad decorator_list Call AttributeLoad NameLoad attr NameLoad Return NameLoad decorator_list Return NameLoad decorator_list FunctionDef arguments args defaults body Assign NameStore AttributeLoad Call AttributeLoad NameLoad attr attr If Call NameLoad NameLoad Str body Expr Call AttributeLoad NameLoad attr Str Call NameLoad AttributeLoad NameLoad attr Assign NameStore AttributeLoad NameLoad attr Assign AttributeStore NameLoad attr NameLoad Delete AttributeDel NameLoad attr decorator_list FunctionDef arguments args NameParam defaults body Expr Str If Call NameLoad NameLoad Str body Expr Call AttributeLoad NameLoad attr Str Call NameLoad NameLoad Call AttributeLoad AttributeLoad NameLoad attr attr orelse Expr Call AttributeLoad NameLoad attr Str Call NameLoad NameLoad TryExcept body Expr Call AttributeLoad NameLoad attr AttributeLoad AttributeLoad NameLoad attr attr handlers ExceptHandler type AttributeLoad AttributeLoad NameLoad attr attr body Pass ExceptHandler type NameLoad name NameStore body Assign NameStore Call AttributeLoad AttributeLoad Call AttributeLoad NameLoad attr attr attr Str Str Expr Call AttributeLoad NameLoad attr Str keyword NameLoad keyword NameLoad TryExcept body Expr Call AttributeLoad NameLoad attr handlers ExceptHandler type AttributeLoad AttributeLoad NameLoad attr attr body Pass ExceptHandler type NameLoad name NameStore body Assign NameStore Call AttributeLoad AttributeLoad Call AttributeLoad NameLoad attr attr attr Str Str Expr Call AttributeLoad NameLoad attr Str keyword NameLoad keyword NameLoad decorator_list Assign NameStore Call AttributeLoad NameLoad attr FunctionDef arguments args NameParam defaults body Expr Str FunctionDef arguments args NameParam defaults body Global identifier If CompareNotEq NameLoad Call AttributeLoad NameLoad attr body Expr Call AttributeLoad AttributeLoad Call AttributeLoad NameLoad attr attr attr Assign NameStore Call AttributeLoad NameLoad attr Return Call NameLoad NameLoad decorator_list Call AttributeLoad NameLoad attr NameLoad Return NameLoad decorator_list ClassDef bases AttributeLoad NameLoad attr body FunctionDef arguments args NameParam NameParam defaults Str body Return Call AttributeLoad AttributeLoad NameLoad attr attr NameLoad NameLoad decorator_list NameLoad decorator_list FunctionDef arguments args NameParam NameParam defaults NameLoad Str body Expr Call AttributeLoad NameLoad attr AttributeLoad Call NameLoad attr NameLoad decorator_list FunctionDef arguments args NameParam defaults Str body Import alias Expr Call AttributeLoad Call NameLoad AttributeLoad NameLoad attr attr NameLoad decorator_list Assign NameStore AttributeLoad NameLoad attr Assign NameStore AttributeLoad NameLoad attr Assign NameStore AttributeLoad NameLoad attr Assign NameStore AttributeLoad NameLoad attr Assign NameStore AttributeLoad NameLoad attr
N/A N/A os N/A os.path N/A sys N/A functools N/A time N/A imp N/A code N/A platform N/A threading N/A collections N/A weakref N/A gevent N/A gevent.pool N/A gevent.socket N/A gevent.threadpool N/A gevent.greenlet N/A faststat support context support ll N/A ml N/A N/A ll LLogger N/A N/A hasattr time perf_counter N/A N/A curtime N/A time perf_counter N/A N/A N/A N/A N/A platform system Windows N/A N/A curtime N/A time clock N/A N/A curtime N/A time time Greenlet N/A N/A gevent Greenlet N/A N/A 
    A subclass of gevent.Greenlet which adds additional members:

     - locals: a dict of variables that are local to the "spawn tree" of
       greenlets
     - spawner: a weak-reference back to the spawner of the
       greenlet
     - stacks: a record of the stack at which the greenlet was
       spawned, and ancestors
     __init__ N/A N/A self f N/A a kw N/A N/A N/A N/A N/A super Greenlet self __init__ f a kw N/A spawner N/A self spawn_parent N/A N/A weakref proxy N/A N/A gevent getcurrent N/A N/A N/A hasattr spawner locals N/A N/A N/A spawner locals N/A N/A N/A self locals N/A spawner locals N/A stack N/A N/A cur N/A N/A sys _getframe N/A cur N/A N/A N/A N/A stack extend N/A N/A cur f_code N/A cur f_lineno N/A cur N/A cur f_back N/A N/A self stacks N/A N/A N/A tuple stack N/A N/A getattr spawner stacks N/A N/A 10 N/A N/A get_spawntree_local N/A N/A name N/A N/A N/A 
    Essentially provides dynamic scope lookup for programming aspects
    that cross greenlet borders. Be wary of overusing this
    functionality, as it effectively constitutes mutating global state
    which can lead to race conditions and architectural problems.
     N/A locals N/A getattr N/A N/A gevent getcurrent locals None N/A locals N/A N/A N/A N/A locals get name N/A None N/A set_spawntree_local N/A N/A name val N/A N/A N/A 
    Similar to get_spawntree_local except that it allows setting these
    values. Again, be wary of overuse.
     N/A cur N/A N/A gevent getcurrent N/A N/A N/A hasattr cur locals N/A N/A N/A cur locals N/A N/A N/A N/A cur locals N/A name val N/A unset_spawntree_local N/A N/A name N/A N/A N/A 
    Delete a variable from the spawntree.
     N/A locals N/A getattr N/A N/A gevent getcurrent locals None N/A locals N/A N/A N/A locals N/A name N/A staggered_retries N/A N/A run N/A a kw N/A N/A 
    A version of spawn that will block will it is done
    running the function, and which will call the function
    repeatedly as time progresses through the timeouts list.

    Best used for idempotent network calls (e.g. HTTP GETs).

    e.g.::

        user_data = async.staggered_retries(get_data, max_results,
                                            latent_data_ok, public_credential_load,
                                            timeouts_secs=[0.1, 0.5, 1, 2])

    returns None on timeout.
     N/A ctx N/A N/A context get_context N/A ready N/A N/A N/A gevent event Event N/A N/A N/A ready clear callback N/A N/A source N/A N/A N/A N/A N/A source successful N/A N/A N/A N/A ready set N/A N/A N/A timeouts_secs kw N/A N/A timeouts_secs N/A N/A kw pop timeouts_secs N/A N/A timeouts_secs N/A 0.05 0.1 0.15 0.2 N/A N/A N/A timeouts_secs N/A 0 0 N/A N/A N/A N/A timeouts_secs insert 0 0 N/A gs N/A N/A gevent spawn run a kw N/A N/A N/A gs link_value callback N/A running N/A gs N/A i N/A range 1 N/A len timeouts_secs N/A N/A this_timeout N/A N/A timeouts_secs N/A i N/A timeouts_secs N/A N/A i 1 N/A N/A ctx dev N/A N/A this_timeout N/A this_timeout 5.0 N/A N/A N/A ml ld2 Using timeout {0} this_timeout N/A N/A N/A N/A N/A gevent Timeout this_timeout N/A N/A N/A N/A ready wait N/A N/A N/A N/A N/A gevent Timeout N/A N/A N/A N/A ml ld2 Timed out! N/A log_rec N/A N/A N/A ctx log critical ASYNC.STAGGER N/A run __name__ N/A N/A N/A log_rec failure timed out after {timeout} timeout this_timeout N/A gs N/A N/A gevent spawn run a kw N/A N/A N/A gs link_value callback N/A N/A N/A running append gs N/A vals N/A N/A l value N/A l running N/A N/A l successful N/A g running N/A N/A N/A N/A g kill N/A vals N/A N/A N/A vals N/A 0 N/A N/A None N/A timed N/A N/A f N/A N/A N/A 
    Wrap a function and time all of its execution calls in milliseconds.
     N/A fname N/A N/A N/A N/A os path basename N/A N/A f __code__ co_filename _ N/A line_no N/A repr N/A N/A f __code__ co_firstlineno N/A name N/A N/A timed.{0}[{1}:{2}](ms) format N/A f __name__ fname line_no g N/A N/A N/A a kw N/A N/A s N/A N/A faststat nanotime N/A r N/A f a kw N/A N/A N/A N/A N/A N/A N/A context get_context stats N/A name add N/A N/A N/A N/A faststat nanotime s 1000000.0 N/A r N/A N/A N/A functools wraps f N/A g N/A ThreadPoolDispatcher N/A object N/A __init__ N/A N/A self pool name N/A N/A N/A N/A self pool pool N/A N/A self name name N/A __call__ N/A N/A self f N/A N/A g N/A N/A N/A a kw N/A N/A enqueued N/A curtime N/A ctx N/A N/A context get_context N/A started N/A in_thread N/A N/A N/A a kw N/A N/A N/A N/A ml ld3 In thread {0} N/A f __name__ N/A N/A N/A started append N/A curtime N/A N/A f a kw N/A N/A N/A N/A N/A ctx cpu_thread_enabled N/A N/A imp lock_held N/A N/A ret N/A in_thread a kw N/A N/A N/A N/A in_threadpool N/A self pool N/A N/A ret N/A in_thread a kw N/A N/A N/A N/A N/A N/A ctx stats N/A N/A N/A self name .depth add N/A 1 N/A len N/A self pool N/A ret N/A N/A N/A self pool apply_e N/A Exception in_thread a kw N/A N/A N/A ml ld3 Enqueued to thread {0}/depth {1} N/A f __name__ N/A len pool N/A start N/A started N/A 0 N/A duration N/A N/A curtime start N/A queued N/A start enqueued N/A N/A N/A hasattr ret __len__ N/A callable N/A ret __len__ N/A N/A prsize N/A N/A ret __len__ N/A N/A N/A a N/A hasattr N/A a N/A 0 __len__ N/A callable N/A N/A a N/A 0 __len__ N/A N/A prsize N/A N/A N/A a N/A 0 __len__ N/A N/A prsize None N/A N/A _queue_stats name N/A f __name__ queued duration prsize N/A ret N/A N/A N/A functools wraps f N/A N/A g no_defer f N/A g N/A N/A in_threadpool N/A N/A N/A N/A N/A Function to return the threadpool in which code is currently executing (if any.) N/A frame N/A N/A sys _getframe N/A N/A frame f_back N/A N/A frame N/A frame f_back N/A self N/A N/A N/A frame f_locals get self N/A N/A N/A isinstance self N/A N/A gevent threadpool ThreadPool N/A N/A frame f_code N/A getattr N/A getattr N/A self _worker im_func func_code N/A N/A self N/A None N/A CPUThread N/A object N/A N/A 
    Manages a single worker thread to dispatch cpu intensive tasks to.

    Signficantly less overhead than gevent.threadpool.ThreadPool() since it
    uses prompt notifications rather than polling.  The trade-off is that only
    one thread can be managed this way.

    Since there is only one thread, hub.loop.async() objects may be used
    instead of polling to handle inter-thread communication.
     __init__ N/A N/A self N/A N/A N/A N/A self in_q N/A N/A collections deque N/A N/A self out_q N/A N/A collections deque N/A N/A self in_async None N/A N/A self out_async N/A N/A N/A N/A N/A gevent get_hub loop async N/A N/A self out_q_has_data N/A N/A N/A gevent event Event N/A N/A N/A N/A self out_async start N/A N/A self out_q_has_data set N/A N/A self worker N/A N/A threading Thread target N/A self _run N/A N/A N/A self worker daemon True N/A N/A self stopping False N/A N/A self results N/A N/A N/A N/A N/A self worker start N/A N/A self notifier N/A N/A gevent spawn N/A self _notify N/A _run N/A N/A self N/A N/A N/A N/A N/A N/A N/A context get_context thread_locals in_cpubound_thread True N/A N/A N/A N/A self in_async N/A N/A N/A N/A N/A gevent get_hub loop async N/A N/A self in_q_has_data N/A N/A N/A gevent event Event N/A N/A N/A N/A self in_async start N/A N/A self in_q_has_data set N/A N/A N/A self stopping N/A N/A N/A N/A self in_q N/A N/A N/A N/A N/A self in_q_has_data clear N/A N/A N/A N/A self in_q_has_data wait N/A N/A N/A jobid func args kwargs enqueued N/A N/A N/A self in_q popleft N/A started N/A curtime N/A N/A N/A ret N/A N/A self results N/A jobid N/A func args kwargs N/A N/A N/A Exception N/A e N/A N/A ret N/A N/A self results N/A jobid N/A N/A self _Caught e N/A N/A N/A N/A self out_q append jobid N/A N/A N/A N/A self out_async send N/A N/A queued duration N/A N/A started enqueued N/A N/A curtime started N/A size None N/A N/A N/A hasattr ret __len__ N/A callable N/A ret __len__ N/A N/A size N/A len ret N/A N/A _queue_stats cpu_bound N/A func __name__ queued duration size N/A N/A N/A N/A N/A N/A self _error N/A apply N/A N/A self func args kwargs N/A N/A N/A done N/A N/A N/A gevent event Event N/A N/A N/A N/A self in_q append N/A done func args kwargs N/A curtime N/A N/A N/A N/A N/A N/A N/A context get_context stats N/A cpu_bound.depth add N/A 1 N/A len N/A self in_q N/A N/A N/A self in_async N/A N/A N/A N/A gevent sleep 0.01 N/A N/A N/A N/A self in_async send N/A N/A N/A done wait N/A res N/A N/A self results N/A done N/A N/A N/A self results N/A done N/A N/A isinstance res N/A self _Caught N/A N/A N/A res err N/A res N/A _notify N/A N/A self N/A N/A N/A N/A N/A N/A N/A self stopping N/A N/A N/A N/A self out_q N/A N/A N/A N/A N/A self out_q_has_data clear N/A N/A N/A N/A self out_q_has_data wait N/A N/A N/A N/A N/A N/A N/A self out_q popleft set N/A N/A N/A N/A N/A N/A self _error N/A _Caught N/A object N/A __init__ N/A N/A self err N/A N/A N/A N/A self err err N/A N/A __repr__ N/A N/A self N/A N/A N/A cn N/A N/A self __class__ __name__ N/A N/A <%s@%s in_q:%s out_q:%s> N/A cn N/A id self N/A len N/A self in_q N/A len N/A self out_q N/A _error N/A N/A self N/A N/A N/A traceback N/A N/A N/A traceback print_exc N/A ctx N/A N/A context get_context N/A tl N/A ctx thread_locals N/A N/A N/A hasattr tl cpu_bound_thread N/A N/A tl cpu_bound_thread self N/A N/A N/A tl cpu_bound_thread N/A N/A _queue_stats N/A N/A qname fname queued_ns duration_ns size_B N/A None N/A N/A ctx N/A N/A context get_context N/A fprefix N/A N/A qname . fname N/A N/A N/A N/A N/A ctx stats N/A N/A fprefix .queued(ms) add N/A queued_ns 1000 N/A N/A N/A N/A N/A ctx stats N/A N/A fprefix .duration(ms) add N/A duration_ns 1000 N/A N/A N/A N/A N/A ctx stats N/A N/A qname .queued(ms) add N/A queued_ns 1000 N/A N/A N/A N/A N/A ctx stats N/A N/A qname .duration(ms) add N/A duration_ns 1000 N/A N/A size_B None N/A N/A N/A N/A N/A N/A ctx stats N/A N/A fprefix .len add size_B N/A duration_ns N/A N/A N/A N/A N/A N/A ctx stats N/A N/A fprefix .rate(B/ms) add N/A size_B N/A duration_ns 1000.0 N/A N/A io_bound N/A ThreadPoolDispatcher N/A N/A N/A gevent threadpool ThreadPool 10 io_bound cpu_bound N/A N/A f p N/A None N/A N/A 
    Cause the decorated function to have its execution deferred to a
    separate thread to avoid blocking the IO loop in the main thread.
    Useful for wrapping encryption or serialization tasks.

    Example usage::

        @async.cpu_bound
        def my_slow_function():
            pass

     g N/A N/A N/A a kw N/A N/A ctx N/A N/A context get_context N/A N/A N/A N/A ctx cpu_thread_enabled N/A N/A imp lock_held N/A getattr N/A ctx thread_locals in_cpubound_thread False N/A N/A N/A f a kw N/A N/A N/A hasattr N/A ctx thread_locals cpu_bound_thread N/A N/A N/A N/A ctx thread_locals cpu_bound_thread N/A CPUThread N/A N/A N/A ml ld3 Calling in cpu thread {0} N/A f __name__ N/A N/A N/A N/A N/A ctx thread_locals cpu_bound_thread apply f a kw N/A N/A N/A functools wraps f N/A N/A g no_defer f N/A g N/A cpu_bound_if N/A N/A p N/A N/A N/A 
    Similar to cpu_bound, but should be called with a predicate
    parameter which determines whether or not to dispatch to a
    cpu_bound thread.  The predicate will be passed the same
    parameters as the function itself.

    Example usage::

        # will be deferred to a thread if parameter greater than 16k,
        # else run inline
        @async.cpu_bound_if(lambda s: len(s) > 16 * 1024)
        def my_string_function(data):
            pass

     g N/A N/A f N/A N/A N/A f N/A cpu_bound f h N/A N/A N/A a kw N/A N/A N/A p a kw N/A N/A N/A f a kw N/A N/A N/A f no_defer a kw N/A N/A N/A functools wraps f N/A h N/A N/A g N/A close_threadpool N/A N/A N/A N/A N/A tlocals N/A N/A N/A context get_context thread_locals N/A N/A hasattr tlocals cpu_bound_thread N/A N/A N/A N/A ml ld2 Closing thread pool {0} N/A id N/A tlocals cpu_thread N/A cpu_thread N/A tlocals cpu_bound_thread N/A N/A cpu_thread stopping True N/A N/A tlocals cpu_bound_thread N/A killsock N/A N/A sock N/A N/A N/A Attempts to cleanly shutdown a socket. Regardless of cleanliness,
    ensures that upon return, the socket is fully closed, catching any
    exceptions along the way. A safe and prompt way to dispose of the
    socket, freeing system resources.
     N/A N/A hasattr sock _sock N/A N/A N/A N/A ml ld Killing socket {0}/FD {1} N/A id sock N/A N/A N/A sock _sock fileno N/A N/A N/A N/A ml ld Killing socket {0} N/A id sock N/A N/A N/A N/A N/A sock shutdown N/A N/A gevent socket SHUT_RDWR N/A N/A N/A N/A N/A gevent socket error N/A N/A N/A N/A Exception N/A e N/A N/A log_rec N/A N/A N/A N/A N/A context get_context log info SOCKET SHUTDOWN N/A N/A N/A log_rec failure error ({exc}) shutting down socket: {socket} socket sock exc e N/A N/A N/A N/A N/A sock close N/A N/A N/A N/A N/A gevent socket error N/A N/A N/A N/A Exception N/A e N/A N/A log_rec N/A N/A N/A N/A N/A context get_context log info SOCKET CLOSE N/A N/A N/A log_rec failure error ({exc}) closing socket: {socket} socket sock exc e N/A N/A PID N/A N/A os getpid check_fork N/A N/A fn N/A N/A N/A Hack for Django/gevent interaction to reset after non-gevent fork. wrapper N/A N/A request N/A N/A N/A PID N/A N/A PID N/A N/A os getpid N/A N/A N/A N/A N/A N/A N/A gevent get_hub loop reinit N/A PID N/A N/A os getpid N/A N/A fn request N/A N/A N/A functools wraps fn N/A wrapper N/A GreenConsole N/A N/A code InteractiveConsole N/A raw_input N/A N/A self prompt N/A N/A N/A N/A N/A N/A code InteractiveConsole raw_input self prompt N/A io_bound N/A start_repl N/A N/A local banner N/A None infra REPL (exit with Ctrl+C) N/A N/A N/A N/A gevent spawn N/A N/A GreenConsole interact banner N/A greenify N/A N/A banner N/A REPL is now greenlet friendly (exit with Ctrl+C) N/A N/A __main__ N/A N/A N/A N/A GreenConsole N/A __main__ __dict__ interact banner N/A N/A spawn N/A Greenlet spawn N/A sleep N/A gevent sleep N/A Timeout N/A gevent Timeout N/A with_timeout N/A gevent with_timeout N/A nanotime N/A faststat nanotime