lib/fluent/engine.rb in fluentd-0.10.24 vs lib/fluent/engine.rb in fluentd-0.10.25

- old
+ new

@@ -172,16 +172,20 @@ @started << s } end def shutdown - @started.reverse_each {|s| - begin - s.shutdown - rescue - $log.warn "unexpected error while shutting down", :error=>$!.to_s - $log.warn_backtrace + @started.map {|s| + Thread.new do + begin + s.shutdown + rescue + $log.warn "unexpected error while shutting down", :error=>$!.to_s + $log.warn_backtrace + end end + }.each {|t| + t.join } end def flush_recursive(array) array.each {|m|