Method: MessageBus::TimerThread#initialize

Defined in:
lib/message_bus/timer_thread.rb

#initializeTimerThread

Returns a new instance of TimerThread.



25
26
27
28
29
30
31
32
# File 'lib/message_bus/timer_thread.rb', line 25

def initialize
  @stopped = false
  @jobs = []
  @mutex = Mutex.new
  @next = nil
  @thread = Thread.new { do_work }
  @on_error = lambda { |e| STDERR.puts "Exception while processing Timer:\n #{e.backtrace.join("\n")}" }
end