- By Inheritance
- Hide All
- Show All
- abstract class ExecutionMetrics extends AnyRef
- trait FiberRunnable extends Runnable
- abstract class Hub[A] extends Serializable
Hub[A]is a concurrent data structure that allows multiple publishers to publish
Avalues and multiple subscribers to poll
Avalues with the guarantee that all subscribers will receive all values published to the hub while they are subscribed.
- abstract class MutableConcurrentQueue[A] extends AnyRef
A MutableConcurrentQueue interface to use under the hood in ZIO.
this is declared as
invokevirtualis slightly cheaper than
- abstract class MutableQueueFieldsPadding[A] extends TailPadding[A] with Serializable
- final class OneElementConcurrentQueue[A] extends MutableConcurrentQueue[A] with Serializable
This is a specialized implementation of MutableConcurrentQueue of capacity 1.
- abstract class RingBuffer[A] extends MutableQueueFieldsPadding[A] with Serializable
A lock-free array-based bounded queue.
- See also
zio.internal.MutableQueueFieldsPadding for more details on padding and object's memory layout. The design is heavily inspired by such libraries as https://github.com/LMAX-Exchange/disruptor and https://github.com/JCTools/JCTools which is based off D. Vyukov's design http://www.1024cores.net/home/lock-free-algorithms/queues/bounded-mpmc-queue Compared to JCTools this implementation doesn't rely on
sun.misc.Unsafe, so it is arguably more portable, and should be easier to read. It's also very extensively commented, including reasoning, assumptions, and hacks.
There is an alternative design described in the paper A Portable Lock-Free Bounded Queue by Pirkelbauer et al. It provides full lock-free guarantees, which generally means that one out of many contending threads is guaranteed to make progress in a finite number of steps. The design thus is not susceptible to threads delaying other threads. However the helping scheme is rather involved and cannot be implemented without allocations (at least I couldn't come up with a way yet). This translates into worse performance on average, and better performance in some very specific situations.
- final class RingBufferArb[A] extends RingBuffer[A]
- final class RingBufferPow2[A] extends RingBuffer[A]
- class StackTraceBuilder extends AnyRef
- final class UniqueKey extends AnyRef
This can be used whenever an arbitrary number of unique keys needs to be generated as this will just use memory location for equality.
- class WeakConcurrentBag[A] extends AnyRef
A WeakConcurrentBag stores a collection of values, each wrapped in a
Deprecated Type Members
- def ZIOSucceedNow[A](a: A): UIO[A]
Returns an effect that models success with the specified value.
- def ZManagedSucceedNow[A](r: A): ZManaged[Any, Nothing, A]
Lifts an eager, pure value into a Managed.
- def ZSTMSucceedNow[A](a: A): ZSTM[Any, Nothing, A]
STMeffect that succeeds with the specified value.
- object Blocking
- object FastList
Listdata type that tries to avoid allocating by special-casing the singleton list and preventing pattern matching.
- object FiberState extends Serializable
- object Hub extends Serializable
- object MutableConcurrentQueue
- object OneShot
- object Platform extends PlatformSpecific
- object RingBuffer extends Serializable
- object RingBufferArb extends Serializable
- object RingBufferPow2 extends Serializable
- object SingleThreadedRingBuffer
- object StackTraceBuilder
- object UniqueKey
- object WeakConcurrentBag
- object ZScheduler
Deprecated Value Members
- val Executor: zio.Executor.type
(Since version 2.0.0) use Executor