Write

weaver.GlobalResourceF$.Write
trait Write[F[_]]

Attributes

Graph
Supertypes
class Object
trait Matchable
class Any

Members list

Concise view

Value members

Abstract methods

protected def rawPut[A](pureOrLazy: Either[A, Resource[F, A]], label: Option[String])(implicit rt: ResourceTag[A]): F[Unit]

Concrete methods

def put[A](value: A, label: Option[String])(implicit rt: ResourceTag[A]): F[Unit]
def putLazy[A](resource: Resource[F, A], label: Option[String])(implicit rt: ResourceTag[A]): F[Unit]

Memoises a resource so to optimise its sharing. The memoised resource gets allocated lazily, when the first suite that needs it starts running, and gets finalised as soon as all suites that need it concurrently are done.

Memoises a resource so to optimise its sharing. The memoised resource gets allocated lazily, when the first suite that needs it starts running, and gets finalised as soon as all suites that need it concurrently are done.

In case the resource was already finalised when a suite needs, it gets re-allocated on demand.

This can be useful for constructs that consume large amount of machine resources (CPU, memory, connections), to ensure they are cleaned-up when they should.

Attributes

def putLazyR[A](resource: Resource[F, A], label: Option[String])(implicit rt: ResourceTag[A]): Resource[F, Unit]
def putR[A](value: A, label: Option[String])(implicit rt: ResourceTag[A]): Resource[F, Unit]

Implicits

Implicits

implicit protected def F: Async[F]