Scope

object Scope
Companion:
class
class Object
trait Matchable
class Any
Scope.type

Value members

Concrete methods

def apply[A : Movable](op: Scope => A)(implicit evidence$3: Movable[A], parent: Scope): A

Create new Scope bound to an anonymous function.

Create new Scope bound to an anonymous function.

Will release when the function returns. Return values of the function are moved to the parent scope. Return values must conform to the lamp.Movable type class.

def bracket[A : Movable](use: Scope => IO[A])(implicit evidence$1: Movable[A], parent: Scope): IO[A]

Create new Scope bound to a cats-effect IO.

Create new Scope bound to a cats-effect IO.

Will release when the IO finishes. Return values of the IO are moved to the parent scope.

def bracket[A : Movable](parent: Scope)(use: Scope => IO[A]): IO[A]

Create new Scope bound to a cats-effect IO.

Create new Scope bound to a cats-effect IO.

Will release when the IO finishes. Return values of the IO are moved to the parent scope.

def free: Scope

Create new free standing Scope, not bound to any lexical scope.

Create new free standing Scope, not bound to any lexical scope.

def inResource: Resource[IO, Scope]

Create new Scope bound to a cats-effect Resource.

Create new Scope bound to a cats-effect Resource.

Will release when the cats-effect Resource cleans up.

def leak[A](op: Scope => A): A

Create new Scope bound to an anonymous function. May leak resources.

Create new Scope bound to an anonymous function. May leak resources.

Will release when the function returns. Return values are not moved to any parent scope.

This method exists to return GC-managed values from a Scope block.

def root[A](op: Scope => Unit): Unit

Create new Scope bound to an anonymous function. Returns nothing.

Create new Scope bound to an anonymous function. Returns nothing.

Will release when the function returns.