Supervisor

abstract class Supervisor[+A]

A Supervisor[A] is allowed to supervise the launching and termination of fibers, producing some visible value of type A from the supervision.

Companion:
object
class Object
trait Matchable
class Any

Value members

Abstract methods

def onEnd[R, E, A](value: Exit[E, A], fiber: Runtime[E, A])(implicit unsafe: Unsafe): Unit
def onStart[R, E, A](environment: ZEnvironment[R], effect: ZIO[R, E, A], parent: Option[Runtime[Any, Any]], fiber: Runtime[E, A])(implicit unsafe: Unsafe): Unit
def value(implicit trace: Trace): UIO[A]

Returns an effect that succeeds with the value produced by this supervisor. This value may change over time, reflecting what the supervisor produces as it supervises fibers.

Returns an effect that succeeds with the value produced by this supervisor. This value may change over time, reflecting what the supervisor produces as it supervises fibers.

Concrete methods

final def ++[B](that: Supervisor[B]): Supervisor[(A, B)]

Returns a new supervisor that performs the function of this supervisor, and the function of the specified supervisor, producing a tuple of the outputs produced by both supervisors.

Returns a new supervisor that performs the function of this supervisor, and the function of the specified supervisor, producing a tuple of the outputs produced by both supervisors.

def map[B](f: A => B): Supervisor[B]

Maps this supervisor to another one, which has the same effect, but whose value has been transformed by the specified function.

Maps this supervisor to another one, which has the same effect, but whose value has been transformed by the specified function.

def onEffect[E, A](fiber: Runtime[E, A], effect: ZIO[_, _, _])(implicit unsafe: Unsafe): Unit
def onResume[E, A](fiber: Runtime[E, A])(implicit unsafe: Unsafe): Unit
def onSuspend[E, A](fiber: Runtime[E, A])(implicit unsafe: Unsafe): Unit