Skip to content

Commit

Permalink
Support 1.9 in threadpool killing
Browse files Browse the repository at this point in the history
  • Loading branch information
raggi committed Jun 5, 2009
1 parent 44ac777 commit efe6bd4
Showing 1 changed file with 5 additions and 1 deletion.
6 changes: 5 additions & 1 deletion lib/eventmachine.rb
Expand Up @@ -246,7 +246,11 @@ def self.run blk=nil, tail=nil, &block
ensure
if @threadpool
@threadpool.each { |t| t.exit }
@threadpool.each { |t| t.kill! if t.alive? }
@threadpool.each do |t|
next unless t.alive?
# ruby 1.9 has no kill!
t.respond_to?(:kill!) ? t.kill! : t.kill
end
@threadqueue = nil
@resultqueue = nil
end
Expand Down

0 comments on commit efe6bd4

Please sign in to comment.