class Writer::TimerThread

Public Class Methods

new(writer) click to toggle source
# File lib/fluent/command/cat.rb, line 118
def initialize(writer)
  @writer = writer
end

Public Instance Methods

run() click to toggle source
# File lib/fluent/command/cat.rb, line 132
def run
  until @finish
    sleep 1
    @writer.on_timer
  end
end
shutdown() click to toggle source
# File lib/fluent/command/cat.rb, line 127
def shutdown
  @finish = true
  @thread.join
end
start() click to toggle source
# File lib/fluent/command/cat.rb, line 122
def start
  @finish = false
  @thread = Thread.new(&method(:run))
end