Class: Fluent::OutputThread
- Inherits:
-
Object
- Object
- Fluent::OutputThread
- Defined in:
- lib/fluent/output.rb
Instance Method Summary collapse
- #configure(conf) ⇒ Object
-
#initialize(output) ⇒ OutputThread
constructor
A new instance of OutputThread.
- #shutdown ⇒ Object
- #start ⇒ Object
- #submit_flush ⇒ Object
Constructor Details
#initialize(output) ⇒ OutputThread
Returns a new instance of OutputThread.
79 80 81 82 83 |
# File 'lib/fluent/output.rb', line 79 def initialize(output) @output = output @finish = false @next_time = Engine.now + 1.0 end |
Instance Method Details
#configure(conf) ⇒ Object
85 86 |
# File 'lib/fluent/output.rb', line 85 def configure(conf) end |
#shutdown ⇒ Object
94 95 96 97 98 99 100 101 |
# File 'lib/fluent/output.rb', line 94 def shutdown @finish = true @mutex.synchronize { @cond.signal } Thread.pass @thread.join end |
#start ⇒ Object
88 89 90 91 92 |
# File 'lib/fluent/output.rb', line 88 def start @mutex = Mutex.new @cond = ConditionVariable.new @thread = Thread.new(&method(:run)) end |
#submit_flush ⇒ Object
103 104 105 106 107 108 109 |
# File 'lib/fluent/output.rb', line 103 def submit_flush @mutex.synchronize { @next_time = 0 @cond.signal } Thread.pass end |