aboutsummaryrefslogtreecommitdiff
path: root/rpkid/rpki/async.py
diff options
context:
space:
mode:
Diffstat (limited to 'rpkid/rpki/async.py')
-rw-r--r--rpkid/rpki/async.py8
1 files changed, 8 insertions, 0 deletions
diff --git a/rpkid/rpki/async.py b/rpkid/rpki/async.py
index a7de6b25..6e9d1edf 100644
--- a/rpkid/rpki/async.py
+++ b/rpkid/rpki/async.py
@@ -385,6 +385,14 @@ def exit_event_loop():
"""
raise ExitNow
+def event_yield(handler, delay = rpki.sundial.timedelta(seconds = 2)):
+ """
+ Use a near-term timer to schedule an event after letting the timer
+ and I/O systems run.
+ """
+ t = timer(handler)
+ t.set(delay)
+
class gc_summary(object):
"""
Periodic summary of GC state, for tracking down memory bloat.