Pool

skunk.util.Pool
object Pool

Attributes

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

Members list

Type members

Classlikes

final case class ResourceLeak(expected: Int, actual: Int, deferrals: Int) extends SkunkException

Class of exceptions raised when a resource leak is detected on pool finalization.

Class of exceptions raised when a resource leak is detected on pool finalization.

Attributes

Source
Pool.scala
Supertypes
trait Product
trait Equals
trait Fields
class Exception
class Throwable
trait Serializable
class Object
trait Matchable
class Any
Show all

Exception raised to deferrals that remain during pool finalization.

Exception raised to deferrals that remain during pool finalization. This indicates a programming error, typically misuse of fibers.

Attributes

Source
Pool.scala
Supertypes
trait Fields
class Exception
class Throwable
trait Serializable
class Object
trait Matchable
class Any
Show all
Self type

Value members

Concrete methods

def of[F[_] : Trace, 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: Trace[F] => Resource[F, A], size: Int)(recycler: Recycler[F, A]): Resource[F, Trace[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