Class Puma::ThreadPool
In: lib/puma/thread_pool.rb
Parent: Object

A simple thread pool management object.

Methods

<<   auto_trim!   backlog   new   shutdown   trim  

Classes and Modules

Class Puma::ThreadPool::AutoTrim

Attributes

spawned  [R] 
trim_requested  [R] 

Public Class methods

Maintain a minimum of min and maximum of max threads in the pool.

The block passed is the work that will be performed in each thread.

Public Instance methods

Add work to the todo list for a Thread to pickup and process.

How many objects have yet to be processed by the pool?

Tell all threads in the pool to exit and wait for them to finish.

If too many threads are in the pool, tell one to finish go ahead and exit. If force is true, then a trim request is requested even if all threads are being utilized.

[Validate]