Packages

object Fiber extends FiberPlatformSpecific

Linear Supertypes
FiberPlatformSpecific, AnyRef, Any
Ordering
  1. Alphabetic
  2. By Inheritance
Inherited
  1. Fiber
  2. FiberPlatformSpecific
  3. AnyRef
  4. Any
  1. Hide All
  2. Show All
Visibility
  1. Public
  2. Protected

Type Members

  1. final case class Descriptor(id: FiberId.Runtime, status: Running, interrupters: Set[FiberId], executor: Executor, isLocked: Boolean) extends Product with Serializable

    A record containing information about a Fiber.

    A record containing information about a Fiber.

    id

    The fiber's unique identifier

    interrupters

    The set of fibers attempting to interrupt the fiber or its ancestors.

    executor

    The Executor executing this fiber

  2. final case class Dump(fiberId: FiberId.Runtime, status: Status, trace: StackTrace) extends Product with Serializable
  3. sealed abstract class Runtime[+E, +A] extends Internal[E, A]

    A runtime fiber that is executing an effect.

    A runtime fiber that is executing an effect. Runtime fibers have an identity and a trace.

  4. sealed trait Status extends AnyRef
  5. sealed abstract class Synthetic[+E, +A] extends Internal[E, A]

    A synthetic fiber that is created from a pure value or that combines existing fibers.

Value Members

  1. final def !=(arg0: Any): Boolean
    Definition Classes
    AnyRef → Any
  2. final def ##: Int
    Definition Classes
    AnyRef → Any
  3. final def ==(arg0: Any): Boolean
    Definition Classes
    AnyRef → Any
  4. final def asInstanceOf[T0]: T0
    Definition Classes
    Any
  5. def awaitAll(fs: Iterable[Fiber[Any, Any]])(implicit trace: Trace): UIO[Unit]

    Awaits on all fibers to be completed, successfully or not.

    Awaits on all fibers to be completed, successfully or not.

    fs

    Iterable of fibers to be awaited

    returns

    UIO[Unit]

  6. def clone(): AnyRef
    Attributes
    protected[lang]
    Definition Classes
    AnyRef
    Annotations
    @throws(classOf[java.lang.CloneNotSupportedException]) @native()
  7. def collectAll[E, A, Collection[+Element] <: Iterable[Element]](fibers: Collection[Fiber[E, A]])(implicit bf: zio.BuildFrom[Collection[Fiber[E, A]], A, Collection[A]]): Synthetic[E, Collection[A]]

    Collects all fibers into a single fiber producing an in-order list of the results.

  8. def collectAllDiscard[E, A](fibers: Iterable[Fiber[E, A]]): Synthetic[E, Unit]

    Collects all fibers into a single fiber discarding their results.

  9. def currentFiber()(implicit unsafe: Unsafe): Option[Fiber[Any, Any]]

    Retrieves the fiber currently executing on this thread, if any.

    Retrieves the fiber currently executing on this thread, if any. This will always be None unless called from within an executing effect and this feature is enabled using Runtime.enableCurrentFiber.

  10. def done[E, A](exit: => Exit[E, A]): Synthetic[E, A]

    A fiber that is done with the specified zio.Exit value.

    A fiber that is done with the specified zio.Exit value.

    E

    error type

    A

    type of the fiber

    exit

    zio.Exit value

    returns

    Fiber[E, A]

  11. def dumpAll(implicit trace: Trace): ZIO[Any, IOException, Unit]

    Dumps all fibers to the console.

  12. def dumpAllWith[R, E](f: (Dump) => ZIO[R, E, Any])(implicit trace: Trace): ZIO[R, E, Unit]

    Dumps all fibers to the specified callback.

  13. final def eq(arg0: AnyRef): Boolean
    Definition Classes
    AnyRef
  14. def equals(arg0: AnyRef): Boolean
    Definition Classes
    AnyRef → Any
  15. def fail[E](e: E): Synthetic[E, Nothing]

    A fiber that has already failed with the specified value.

    A fiber that has already failed with the specified value.

    E

    error type

    e

    failure value

    returns

    Fiber[E, Nothing] failed fiber

  16. def failCause[E](cause: Cause[E]): Synthetic[E, Nothing]

    Creates a Fiber that has already failed with the specified cause.

  17. def fromCompletionStage[A](thunk: => CompletionStage[A]): Fiber[Throwable, A]
    Definition Classes
    FiberPlatformSpecific
  18. def fromFuture[A](thunk: => Future[A])(implicit trace: Trace): Synthetic[Throwable, A]

    Returns a Fiber that is backed by the specified Future.

    Returns a Fiber that is backed by the specified Future.

    A

    type of the Fiber

    thunk

    Future[A] backing the Fiber

    returns

    Fiber[Throwable, A]

  19. def fromFutureJava[A](thunk: => Future[A]): Fiber[Throwable, A]

    WARNING: this uses the blocking Future#get, consider using fromCompletionStage

    WARNING: this uses the blocking Future#get, consider using fromCompletionStage

    Definition Classes
    FiberPlatformSpecific
  20. def fromZIO[E, A](io: IO[E, A])(implicit trace: Trace): UIO[Synthetic[E, A]]

    Lifts an zio.ZIO into a Fiber.

    Lifts an zio.ZIO into a Fiber.

    E

    error type

    A

    type of the fiber

    io

    IO[E, A] to turn into a Fiber

    returns

    UIO[Fiber[E, A]]

  21. final def getClass(): Class[_ <: AnyRef]
    Definition Classes
    AnyRef → Any
    Annotations
    @native()
  22. def hashCode(): Int
    Definition Classes
    AnyRef → Any
    Annotations
    @native()
  23. def interruptAll(fs: Iterable[Fiber[Any, Any]])(implicit trace: Trace): UIO[Unit]

    Interrupts all fibers, awaiting their interruption.

    Interrupts all fibers, awaiting their interruption.

    fs

    Iterable of fibers to be interrupted

    returns

    UIO[Unit]

  24. def interruptAllAs(fiberId: FiberId)(fs: Iterable[Fiber[Any, Any]])(implicit trace: Trace): UIO[Unit]

    Interrupts all fibers as by the specified fiber, awaiting their interruption.

    Interrupts all fibers as by the specified fiber, awaiting their interruption.

    fiberId

    The identity of the fiber to interrupt as.

    fs

    Iterable of fibers to be interrupted

    returns

    UIO[Unit]

  25. def interruptAs(id: FiberId): Synthetic[Nothing, Nothing]

    A fiber that is already interrupted.

    A fiber that is already interrupted.

    returns

    Fiber[Nothing, Nothing] interrupted fiber

  26. final def isInstanceOf[T0]: Boolean
    Definition Classes
    Any
  27. def joinAll[E](fs: Iterable[Fiber[E, Any]])(implicit trace: Trace): IO[E, Unit]

    Joins all fibers, awaiting their _successful_ completion.

    Joins all fibers, awaiting their _successful_ completion. Attempting to join a fiber that has erred will result in a catchable error, _if_ that error does not result from interruption.

    fs

    Iterable of fibers to be joined

    returns

    UIO[Unit]

  28. final def ne(arg0: AnyRef): Boolean
    Definition Classes
    AnyRef
  29. val never: Synthetic[Nothing, Nothing]

    A fiber that never fails or succeeds.

  30. final def notify(): Unit
    Definition Classes
    AnyRef
    Annotations
    @native()
  31. final def notifyAll(): Unit
    Definition Classes
    AnyRef
    Annotations
    @native()
  32. def roots(implicit trace: Trace): UIO[Chunk[Runtime[_, _]]]

    Returns a chunk containing all root fibers.

    Returns a chunk containing all root fibers. Due to concurrency, the returned chunk is only weakly consistent.

  33. def succeed[A](a: A): Synthetic[Nothing, A]

    Returns a fiber that has already succeeded with the specified value.

    Returns a fiber that has already succeeded with the specified value.

    A

    type of the fiber

    a

    success value

    returns

    Fiber[E, A] succeeded fiber

  34. final def synchronized[T0](arg0: => T0): T0
    Definition Classes
    AnyRef
  35. def toString(): String
    Definition Classes
    AnyRef → Any
  36. val unit: Synthetic[Nothing, Unit]

    A fiber that has already succeeded with unit.

  37. final def wait(): Unit
    Definition Classes
    AnyRef
    Annotations
    @throws(classOf[java.lang.InterruptedException])
  38. final def wait(arg0: Long, arg1: Int): Unit
    Definition Classes
    AnyRef
    Annotations
    @throws(classOf[java.lang.InterruptedException])
  39. final def wait(arg0: Long): Unit
    Definition Classes
    AnyRef
    Annotations
    @throws(classOf[java.lang.InterruptedException]) @native()
  40. object Status

Deprecated Value Members

  1. def finalize(): Unit
    Attributes
    protected[lang]
    Definition Classes
    AnyRef
    Annotations
    @throws(classOf[java.lang.Throwable]) @Deprecated
    Deprecated

    (Since version 9)

Inherited from FiberPlatformSpecific

Inherited from AnyRef

Inherited from Any

Ungrouped