Generic LIFO resource pool (kombu.resource.Resource).
Summary
Functions
Acquires a resource from pool (Resource.acquire).
Returns a specification to start this module under a supervisor.
Closes and removes all resources in the pool, including those currently in use
(Resource.force_close_all).
Returns the current pool limit.
Creates a new %Kombu.Resource{} pool process.
Releases resource back to pool (Resource.release).
Discards a defective resource from pool and closes it (Resource.replace).
Resizes the pool limit (Resource.resize).
Pre-populates the pool with lazy resource factories up to limit - dirty.
Acquires a resource, passes it to fun.(resource), and ensures it is released afterwards.
Types
Functions
Acquires a resource from pool (Resource.acquire).
Returns a specification to start this module under a supervisor.
See Supervisor.
Closes and removes all resources in the pool, including those currently in use
(Resource.force_close_all).
@spec limit(t()) :: non_neg_integer() | nil
Returns the current pool limit.
Creates a new %Kombu.Resource{} pool process.
Releases resource back to pool (Resource.release).
Discards a defective resource from pool and closes it (Resource.replace).
@spec resize(t(), non_neg_integer() | nil, keyword()) :: :ok
Resizes the pool limit (Resource.resize).
@spec setup(t()) :: :ok
Pre-populates the pool with lazy resource factories up to limit - dirty.
Acquires a resource, passes it to fun.(resource), and ensures it is released afterwards.