This pool can be used for resources that are still reasonably cheap to produce and discard, and will never block waiting for a resource — it's not a good pool for DB connections.
type'a t
Pool of values of type 'a
val create :
?clear:('a-> unit)->mk_item:(unit ->'a)->?max_size:int ->unit ->'at
Create a new pool.
parametermk_item
produce a new item in case the pool is empty
parametermax_size
maximum number of item in the pool before we start dropping resources on the floor. This controls resource consumption.