backends.async

Async I/O backend support utilities.

Module Contents

Classes

Drainer(self,result_consumer) Result draining service.
greenletDrainer(self,*args,**kwargs)
eventletDrainer()
geventDrainer()
AsyncBackendMixin() Mixin for backends that enables the async API.
BaseResultConsumer(self,backend,app,accept,pending_results,pending_messages) Manager responsible for consuming result messages.

Functions

register_drainer(name) Decorator used to register a new result drainer type.
register_drainer(name)

Decorator used to register a new result drainer type.

class Drainer(result_consumer)

Result draining service.

__init__(result_consumer)
start()
stop()
drain_events_until(p, timeout=None, on_interval=None, wait=None)
wait_for(p, wait, timeout=None)
class greenletDrainer(*args, **kwargs)
__init__(*args, **kwargs)
run()
start()
stop()
wait_for(p, wait, timeout=None)
class eventletDrainer
spawn()
class geventDrainer
spawn()
class AsyncBackendMixin

Mixin for backends that enables the async API.

_collect_into(result, bucket)
iter_native(result, no_ack=True, **kwargs)
add_pending_result(result, weak=False, start_drainer=True)
_maybe_resolve_from_buffer(result)
_add_pending_result(task_id, result, weak=False)
add_pending_results(results, weak=False)
remove_pending_result(result)
_remove_pending_result(task_id)
on_result_fulfilled(result)
wait_for_pending(result, callback=None, propagate=True, **kwargs)
_wait_for_pending(result, timeout=None, on_interval=None, on_message=None, **kwargs)
is_async()
class BaseResultConsumer(backend, app, accept, pending_results, pending_messages)

Manager responsible for consuming result messages.

__init__(backend, app, accept, pending_results, pending_messages)
start(initial_task_id, **kwargs)
stop()
drain_events(timeout=None)
consume_from(task_id)
cancel_for(task_id)
_after_fork()
on_after_fork()
drain_events_until(p, timeout=None, on_interval=None)
_wait_for_pending(result, timeout=None, on_interval=None, on_message=None, **kwargs)
on_wait_for_pending(result, timeout=None, **kwargs)
on_out_of_band_result(message)
_get_pending_result(task_id)
on_state_change(meta, message)