Skip to content

Commit

Permalink
Reduce hard timeout wait time
Browse files Browse the repository at this point in the history
  • Loading branch information
mario-at-intercom committed May 25, 2016
1 parent 9f38980 commit ae24c25
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 1 deletion.
1 change: 1 addition & 0 deletions .ruby-version
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
2.3.0
5 changes: 4 additions & 1 deletion lib/shoryuken/manager.rb
Original file line number Diff line number Diff line change
Expand Up @@ -68,6 +68,7 @@ def processor_done(queue, processor)

if stopped?
processor.terminate if processor.alive?
return after(0) { @finished.signal } if @busy.empty?
else
@ready << processor
end
Expand All @@ -81,7 +82,9 @@ def processor_died(processor, reason)
@threads.delete(processor.object_id)
@busy.delete processor

unless stopped?
if stopped?
return after(0) { @finished.signal } if @busy.empty?
else
@ready << build_processor
end
end
Expand Down

0 comments on commit ae24c25

Please sign in to comment.