ExPool v0.1.1
ExPool.State.Queue
Manages the queue of waiting requests of the pool.
Summary
Removes an item from the queue
Pops an item from the queue
Adds an item to the queue
Returns the number of waiting processes
Types
t :: %ExPool.State.Queue{items: items}
Functions
Specs
keep(t, (item -> boolean)) :: t
Removes an item from the queue.
Specs
new(config :: [Keyword]) :: t
Specs
pop(t) :: {:ok, {item, t}} | {:empty, t}
Pops an item from the queue.
Adds an item to the queue.
Specs
size(t) :: non_neg_integer
Returns the number of waiting processes.