Skip to content

Commit

Permalink
Revert "Confirm that resource usage is still 0 before retiring. (#17)"
Browse files Browse the repository at this point in the history
This reverts commit ed9050c.
  • Loading branch information
ioquatix committed Apr 22, 2024
1 parent 5c1c143 commit 01e8d9d
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 7 deletions.
1 change: 0 additions & 1 deletion .mailmap

This file was deleted.

10 changes: 4 additions & 6 deletions lib/async/pool/controller.rb
Original file line number Diff line number Diff line change
Expand Up @@ -170,12 +170,10 @@ def prune(retain = 0)

# It's okay for this to context switch:
unused.each do |resource|
if usage = @resources[resource] and usage.zero?
if block_given?
yield resource
else
retire(resource)
end
if block_given?
yield resource
else
retire(resource)
end

break if @resources.size <= retain
Expand Down

0 comments on commit 01e8d9d

Please sign in to comment.