aboutsummaryrefslogtreecommitdiff
path: root/lib/mauve/timer.rb
diff options
context:
space:
mode:
Diffstat (limited to 'lib/mauve/timer.rb')
-rw-r--r--lib/mauve/timer.rb11
1 files changed, 11 insertions, 0 deletions
diff --git a/lib/mauve/timer.rb b/lib/mauve/timer.rb
index a00d66d..5a43b60 100644
--- a/lib/mauve/timer.rb
+++ b/lib/mauve/timer.rb
@@ -7,6 +7,9 @@ require 'log4r'
module Mauve
+ #
+ # This is the thread that looks for reminders and heartbeat alerts to poll.
+ #
class Timer < MauveThread
include Singleton
@@ -20,6 +23,14 @@ module Mauve
super
end
+ private
+
+ # This is the trigger for heartbeats and reminders.
+ #
+ # It looks up the next event, and sleeps until it is due. If an update
+ # comes in (via the processor) it is broken out of its sleep, and starts
+ # again when woken up.
+ #
def main_loop
#
# Get the next alert.