Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with
or
.
Download ZIP
Browse files

shutdown won't block

  • Loading branch information...
commit 73a317f8cbd955a5ca2c886a6f73d6d2ce3c8032 1 parent 975bf81
@frsyuki frsyuki authored
Showing with 10 additions and 6 deletions.
  1. +10 −6 lib/fluent/engine.rb
View
16 lib/fluent/engine.rb
@@ -174,13 +174,17 @@ def start
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
Please sign in to comment.
Something went wrong with that request. Please try again.