mirror of https://github.com/reiseburo/hermann
depend on concurrent-ruby ~> 1.0.0
This commit is contained in:
parent
246f27e76d
commit
587f3be16e
|
@ -29,7 +29,7 @@ Gem::Specification.new do |s|
|
||||||
|
|
||||||
if RUBY_PLATFORM == "java"
|
if RUBY_PLATFORM == "java"
|
||||||
s.files << 'lib/hermann_jars.rb'
|
s.files << 'lib/hermann_jars.rb'
|
||||||
s.add_dependency 'concurrent-ruby', '~> 0.7.0'
|
s.add_dependency 'concurrent-ruby', '~> 1.0.0'
|
||||||
|
|
||||||
# IMPORTANT: make sure that jar-dependencies is only a development
|
# IMPORTANT: make sure that jar-dependencies is only a development
|
||||||
# dependency of your gem. if it is a runtime dependencies the require_jars
|
# dependency of your gem. if it is a runtime dependencies the require_jars
|
||||||
|
|
|
@ -102,7 +102,8 @@ module Hermann
|
||||||
@children.each do |child|
|
@children.each do |child|
|
||||||
# Skip over any children that should already be reaped for other
|
# Skip over any children that should already be reaped for other
|
||||||
# reasons
|
# reasons
|
||||||
next if child.completed?
|
next if (Hermann.jruby? ? child.fulfilled? : child.completed?)
|
||||||
|
|
||||||
# Propagate errors to the remaining children
|
# Propagate errors to the remaining children
|
||||||
child.internal_set_error(ex)
|
child.internal_set_error(ex)
|
||||||
end
|
end
|
||||||
|
@ -118,7 +119,7 @@ module Hermann
|
||||||
# Filter all children who are no longer pending/fulfilled
|
# Filter all children who are no longer pending/fulfilled
|
||||||
total_children = @children.size
|
total_children = @children.size
|
||||||
|
|
||||||
@children = @children.reject { |c| c.completed? }
|
@children = @children.reject { |c| Hermann.jruby? ? c.fulfilled? : c.completed? }
|
||||||
|
|
||||||
return (total_children - children.size)
|
return (total_children - children.size)
|
||||||
end
|
end
|
||||||
|
|
Loading…
Reference in New Issue