class Puma::ThreadPool
def reap
If there are dead threads in the pool make them go away while decreasing
def reap with_mutex do dead_workers = @workers.reject(&:alive?) dead_workers.each do |worker| worker.kill @spawned -= 1 end @workers.delete_if do |w| dead_workers.include?(w) end end end