mirror of
https://github.com/puma/puma.git
synced 2022-11-09 13:48:40 -05:00
Use delete_if to remove dead workers.
``` allocated memory by file ----------------------------------- 544 /Users/frodsan/Code/frodsan/puma/lib/puma/thread_pool.rb (Before) 40 /Users/frodsan/Code/frodsan/puma/lib/puma/thread_pool.rb (After) retained memory by location ----------------------------------- 504 /Users/frodsan/Code/frodsan/puma/lib/puma/thread_pool.rb:184 (Before) 0 /Users/frodsan/Code/frodsan/puma/lib/puma/thread_pool.rb:184 (After) ```
This commit is contained in:
parent
342cbd1923
commit
0bfd58decd
1 changed files with 3 additions and 1 deletions
|
@ -181,7 +181,9 @@ module Puma
|
|||
@spawned -= 1
|
||||
end
|
||||
|
||||
@workers -= dead_workers
|
||||
@workers.delete_if do |w|
|
||||
dead_workers.include?(w)
|
||||
end
|
||||
end
|
||||
end
|
||||
|
||||
|
|
Loading…
Add table
Reference in a new issue