RPKI Engine 1.0
|
Public Member Functions | |
def | __cmp__ |
def | __del__ |
def | __init__ |
def | __repr__ |
def | cancel |
def | clear |
def | errback |
def | handler |
def | is_set |
def | runq |
def | seconds_until_wakeup |
def | set |
def | set_errback |
def | set_handler |
def | trace |
Public Attributes | |
errback | |
handler | |
when | |
Static Public Attributes | |
gc_debug = False | |
Verbose chatter about timers states and garbage collection. | |
list | queue = [] |
Timer queue, shared by all timer instances (there can be only one queue). | |
run_debug = False | |
Verbose chatter about timers being run. |
Timer construct for event-driven code. It can be used in either of two ways: - As a virtual class, in which case the subclass should provide a handler() method to receive the wakup event when the timer expires; or - By setting an explicit handler callback, either via the constructor or the set_handler() method. Subclassing is probably more Pythonic, but setting an explict handler turns out to be very convenient when combined with bound methods to other objects.
def rpki.async.timer.__init__ | ( | self, | |
handler = None , |
|||
errback = None |
|||
) |
def rpki.async.timer.cancel | ( | self | ) |
def rpki.async.timer.clear | ( | cls | ) |
def rpki.async.timer.errback | ( | self, | |
e | |||
) |
def rpki.async.timer.handler | ( | self | ) |
def rpki.async.timer.is_set | ( | self | ) |
def rpki.async.timer.runq | ( | cls | ) |
def rpki.async.timer.seconds_until_wakeup | ( | cls | ) |
Calculate delay until next timer expires, or None if no timers are set and we should wait indefinitely. Rounds up to avoid spinning in select() or poll(). We could calculate fractional seconds in the right units instead, but select() and poll() don't even take the same units (argh!), and we're not doing anything that hair-triggered, so rounding up is simplest.
def rpki.async.timer.set | ( | self, | |
when | |||
) |
def rpki.async.timer.set_errback | ( | self, | |
errback | |||
) |
def rpki.async.timer.set_handler | ( | self, | |
handler | |||
) |
rpki::async.timer::gc_debug = False [static] |
rpki::async.timer::queue = [] [static] |
rpki::async.timer::run_debug = False [static] |