ResourceSharedMemoizedOps

cats.effect.resource_shared_memoized.`package`.ResourceSharedMemoizedOps
final implicit class ResourceSharedMemoizedOps[F[_], A](resource: Resource[F, A]) extends AnyVal

Attributes

Source
package.scala
Graph
Supertypes
class AnyVal
trait Matchable
class Any

Members list

Value members

Concrete methods

def memoizeShared(implicit F: Concurrent[F]): F[Resource[F, A]]

Takes a Resource and returns a Resource that will allocate the resource once, even if you use it multiple times.

Takes a Resource and returns a Resource that will allocate the resource once, even if you use it multiple times. It keeps track of how many users it has and releases the Resource when there are no more users.

Attributes

See also

ResourceSharedMemoized.memoize

Source
package.scala
def memoizeSharedWithDelayedRelease(keepAfterRelease: FiniteDuration)(implicit F: Temporal[F]): F[Resource[F, A]]

Takes a Resource and returns a Resource that will allocate the resource once, even if you use it multiple times.

Takes a Resource and returns a Resource that will allocate the resource once, even if you use it multiple times. It keeps track of how many users it has and releases the Resource when there are no more users.

Keeps the resource around for keepAfterRelease when the last user stops using it before releasing.

Attributes

See also
Source
package.scala