class SystemTimer::ThreadTimer

Timer saving associated thread. This is needed because we trigger timers from a Ruby signal handler and Ruby signals are always delivered to main thread.

Attributes

exception_class[R]
thread[R]
trigger_time[R]

Public Instance Methods

to_s() click to toggle source
# File lib/system_timer/thread_timer.rb, line 17
def to_s
  "<ThreadTimer :time => #{trigger_time}, :thread => #{thread}, :exception_class => #{exception_class}>"
end

Public Class Methods

new(trigger_time, thread, exception_class = nil) click to toggle source
# File lib/system_timer/thread_timer.rb, line 11
def initialize(trigger_time, thread, exception_class = nil)
  @trigger_time = trigger_time
  @thread = thread
      @exception_class = exception_class || Timeout::Error
end