object Fiber extends FiberPlatformSpecific
- Alphabetic
- By Inheritance
- Fiber
- FiberPlatformSpecific
- AnyRef
- Any
- Hide All
- Show All
- Public
- Protected
Type Members
- sealed abstract class Descriptor extends AnyRef
- sealed abstract class Dump extends Serializable
- sealed abstract class Runtime[+E, +A] extends Fiber[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.
- sealed abstract class Status extends Serializable with Product
- sealed abstract class Synthetic[+E, +A] extends Fiber[E, A]
A synthetic fiber that is created from a pure value or that combines existing fibers.
Deprecated Type Members
- type Id = FiberId
The identity of a Fiber, described by the time it began life, and a monotonically increasing sequence number generated from an atomic counter.
The identity of a Fiber, described by the time it began life, and a monotonically increasing sequence number generated from an atomic counter.
- Annotations
- @deprecated
- Deprecated
(Since version 2.0.0) use FiberId
Value Members
- final def !=(arg0: Any): Boolean
- Definition Classes
- AnyRef → Any
- final def ##: Int
- Definition Classes
- AnyRef → Any
- final def ==(arg0: Any): Boolean
- Definition Classes
- AnyRef → Any
- final def asInstanceOf[T0]: T0
- Definition Classes
- Any
- def awaitAll(fs: Iterable[Fiber[Any, Any]]): UIO[Unit]
Awaits on all fibers to be completed, successfully or not.
Awaits on all fibers to be completed, successfully or not.
- fs
Iterableof fibers to be awaited- returns
UIO[Unit]
- def clone(): AnyRef
- Attributes
- protected[lang]
- Definition Classes
- AnyRef
- Annotations
- @throws(classOf[java.lang.CloneNotSupportedException]) @native()
- 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.
- def done[E, A](exit: => Exit[E, A]): Synthetic[E, A]
A fiber that is done with the specified zio.Exit value.
- def dump(fibers: Runtime[_, _]*): UIO[Iterable[Dump]]
Collects a complete dump of the specified fibers and all children of the fibers.
- def dumpStr(fibers: Runtime[_, _]*): UIO[String]
Collects a complete dump of the specified fibers and all children of the fibers and renders it as a string.
- final def eq(arg0: AnyRef): Boolean
- Definition Classes
- AnyRef
- def equals(arg0: AnyRef): Boolean
- Definition Classes
- AnyRef → Any
- 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
- def failCause[E](cause: Cause[E]): Synthetic[E, Nothing]
Creates a
Fiberthat has already failed with the specified cause. - val fiberName: ZFiberRef.Runtime[Option[String]]
A
FiberRefthat stores the name of the fiber, which defaults toNone. - def finalize(): Unit
- Attributes
- protected[lang]
- Definition Classes
- AnyRef
- Annotations
- @throws(classOf[java.lang.Throwable])
- def fromFuture[A](thunk: => Future[A]): Synthetic[Throwable, A]
Returns a
Fiberthat is backed by the specifiedFuture.Returns a
Fiberthat is backed by the specifiedFuture.- A
type of the
Fiber- thunk
Future[A]backing theFiber- returns
Fiber[Throwable, A]
- def fromZIO[E, A](io: IO[E, A]): UIO[Synthetic[E, A]]
Lifts an zio.IO into a
Fiber.Lifts an zio.IO into a
Fiber.- E
error type
- A
type of the fiber
- io
IO[E, A]to turn into aFiber- returns
UIO[Fiber[E, A]]
- final def getClass(): Class[_ <: AnyRef]
- Definition Classes
- AnyRef → Any
- Annotations
- @native()
- def hashCode(): Int
- Definition Classes
- AnyRef → Any
- Annotations
- @native()
- def interruptAll(fs: Iterable[Fiber[Any, Any]]): UIO[Unit]
Interrupts all fibers, awaiting their interruption.
Interrupts all fibers, awaiting their interruption.
- fs
Iterableof fibers to be interrupted- returns
UIO[Unit]
- def interruptAllAs(fiberId: FiberId)(fs: Iterable[Fiber[Any, Any]]): 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
Iterableof fibers to be interrupted- returns
UIO[Unit]
- 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
- final def isInstanceOf[T0]: Boolean
- Definition Classes
- Any
- def joinAll[E](fs: Iterable[Fiber[E, Any]]): 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
Iterableof fibers to be joined- returns
UIO[Unit]
- final def ne(arg0: AnyRef): Boolean
- Definition Classes
- AnyRef
- val never: Synthetic[Nothing, Nothing]
A fiber that never fails or succeeds.
- final def notify(): Unit
- Definition Classes
- AnyRef
- Annotations
- @native()
- final def notifyAll(): Unit
- Definition Classes
- AnyRef
- Annotations
- @native()
- def putDumpStr(label: String, fibers: Runtime[_, _]*): ZIO[Has[Console], IOException, Unit]
Collects a complete dump of the specified fibers and all children of the fibers and renders it to the console.
- 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
- final def synchronized[T0](arg0: => T0): T0
- Definition Classes
- AnyRef
- def toString(): String
- Definition Classes
- AnyRef → Any
- val unit: Synthetic[Nothing, Unit]
A fiber that has already succeeded with unit.
- def unsafeCurrentFiber(): 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
Noneunless called from within an executing effect. - final def wait(): Unit
- Definition Classes
- AnyRef
- Annotations
- @throws(classOf[java.lang.InterruptedException])
- final def wait(arg0: Long, arg1: Int): Unit
- Definition Classes
- AnyRef
- Annotations
- @throws(classOf[java.lang.InterruptedException])
- final def wait(arg0: Long): Unit
- Definition Classes
- AnyRef
- Annotations
- @throws(classOf[java.lang.InterruptedException]) @native()
- object Descriptor
- object Dump extends Serializable
- object Status extends Serializable
Deprecated Value Members
- val Id: FiberId.type
- Annotations
- @deprecated
- Deprecated
(Since version 2.0.0) use FiberId
- def fromEffect[E, A](io: IO[E, A]): UIO[Synthetic[E, A]]
Lifts an zio.IO into a
Fiber.Lifts an zio.IO into a
Fiber.- E
error type
- A
type of the fiber
- io
IO[E, A]to turn into aFiber- returns
UIO[Fiber[E, A]]
- Annotations
- @deprecated
- Deprecated
(Since version 2.0.0) use fromZIO
- def halt[E](cause: Cause[E]): Synthetic[E, Nothing]
Creates a
Fiberthat is halted with the specified cause.Creates a
Fiberthat is halted with the specified cause.- Annotations
- @deprecated
- Deprecated
(Since version 2.0.0) use failCause