Pool

skunk.util.Pool$
object Pool

Attributes

Source
Pool.scala
Graph
Supertypes
class Object
trait Matchable
class Any
Self type
Pool.type

Members list

Value members

Concrete methods

def of[F[_] : Tracer, A](rsrc: Resource[F, A], size: Int)(recycler: Recycler[F, A]): Resource[F, Resource[F, A]]

Attributes

Source
Pool.scala
def ofF[F[_] : Concurrent, A](rsrc: Tracer[F] => Resource[F, A], size: Int)(recycler: Recycler[F, A]): Resource[F, Tracer[F] => Resource[F, A]]

A pooled resource (which is itself a managed resource).

A pooled resource (which is itself a managed resource).

Value parameters

recycler

a cleanup/health-check to be done before elements are returned to the pool; yielding false here means the element should be freed and removed from the pool.

rsrc

the underlying resource to be pooled

size

maximum size of the pool (must be positive)

Attributes

Source
Pool.scala