RPKI Engine
1.0
|
Public Member Functions | |
def | __call__ |
def | __init__ |
def | cb |
def | eb |
Public Attributes | |
func | |
Static Public Attributes | |
err = None | |
res = None |
Synchronous wrapper around asynchronous functions. Running in asynchronous mode at all times makes sense for event-driven daemons, but is kind of tedious for simple scripts, hence this wrapper. The wrapped function should take at least two arguments: a callback function and an errback function. If any arguments are passed to the wrapper, they will be passed as additional arguments to the wrapped function.
def rpki::async::sync_wrapper::__call__ | ( | self, | |
args, | |||
kwargs | |||
) |
Definition at line 359 of file async.py.
References rpki::adns::dispatcher::cb, rpki::adns::query::cb, rpki::adns::getaddrinfo::cb, cb(), rpki::async::defer(), rpki::adns::dispatcher::eb, rpki::adns::query::eb, rpki::adns::getaddrinfo::eb, eb(), err, rpki::async::event_loop(), func, and res.
def rpki::async::sync_wrapper::cb | ( | self, | |
res = None |
|||
) |
Wrapped code has requested normal termination. Store result, and exit the event loop.
Definition at line 342 of file async.py.
References res.
Referenced by __call__().
def rpki::async::sync_wrapper::eb | ( | self, | |
err | |||
) |
Wrapped code raised an exception. Store exception data, then exit the event loop.
Definition at line 350 of file async.py.
References err.
Referenced by __call__().
rpki::async::sync_wrapper::err = None [static] |
Definition at line 337 of file async.py.
Referenced by __call__(), and eb().
Definition at line 339 of file async.py.
Referenced by __call__().
rpki::async::sync_wrapper::res = None [static] |
Definition at line 336 of file async.py.
Referenced by __call__(), and cb().