class Puma::ThreadPool

def reap

Experimental RBS support (using type sampling data from the type_fusion project).

def reap: () -> untyped

This signature was generated using 2 samples from 1 application.

spawned counter so that new healthy threads could be created again.
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