SyntaxUnsafeGet

izumi.functional.lifecycle.Lifecycle.SyntaxUnsafeGet
final implicit class SyntaxUnsafeGet[F[_], A](resource: Lifecycle[F, A]) extends AnyVal

Attributes

Graph
Supertypes
class AnyVal
trait Matchable
class Any

Members list

Value members

Concrete methods

def unsafeAllocate()(implicit F: QuasiPrimitives[F]): F[(A, () => F[Unit])]

Unsafely acquire the resource, return it and the finalizer. The resource will be leaked unless the finalizer is used.

Unsafely acquire the resource, return it and the finalizer. The resource will be leaked unless the finalizer is used.

This function usually only makes sense in code examples or at top-level, please use SyntaxUse#use otherwise!

Attributes

Note

will acquire the resource without an uninterruptible section

def unsafeGet()(implicit F: QuasiPrimitives[F]): F[A]

Unsafely acquire the resource and throw away the finalizer, this will leak the resource and cause it to never be cleaned up.

Unsafely acquire the resource and throw away the finalizer, this will leak the resource and cause it to never be cleaned up.

This function usually only makes sense in code examples or at top-level, please use SyntaxUse#use otherwise!

Attributes

Note

will acquire the resource without an uninterruptible section