package internal
- Alphabetic
- By Inheritance
- internal
- AnyRef
- Any
- Hide All
- Show All
- Public
- Protected
Type Members
- abstract class ExecutionMetrics extends AnyRef
- trait FiberRunnable extends Runnable
- abstract class Hub[A] extends Serializable
A
Hub[A]is a concurrent data structure that allows multiple publishers to publishAvalues and multiple subscribers to pollAvalues 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.
A MutableConcurrentQueue interface to use under the hood in ZIO.
The implementation at minimum:
- Should be non-blocking and ideally lock-free.
- Should provide basic metrics such as how many elements were enqueued/dequeued.
- Attributes
- protected[zio]
- Note
this is declared as
abstract classsinceinvokevirtualis slightly cheaper thaninvokeinterface.
- final class OneElementConcurrentQueue[A] extends MutableConcurrentQueue[A] with Serializable
- abstract class RingBuffer[A] extends MutableConcurrentQueue[A]
See zio.internal.RingBuffer for details on design, tradeoffs, etc.
- 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
WeakReference.A WeakConcurrentBag stores a collection of values, each wrapped in a
WeakReference. The structure is optimized for addition, and will achieve zero allocations in the happy path (aside from the allocation of theWeakReference, which is unavoidable). To remove a value from the bag, it is sufficient to clear the corresponding weak reference, at which point the weak reference will be removed from the bag during the next garbage collection.Garbage collection happens regularly during the
addoperation. Assuming uniform distribution of hash codes of values added to the bag, the chance of garbage collection occurring during anaddoperation is 1/n, wherenis the capacity of the table backing the bag.
Value Members
- def ZIOSucceedNow[A](a: A): UIO[A]
Returns an effect that models success with the specified value.
- def ZSTMSucceedNow[A](a: A): ZSTM[Any, Nothing, A]
Returns an
STMeffect that succeeds with the specified value. - object FastList
A
Listdata type that tries to avoid allocating by special-casing the singleton list and preventing pattern matching. - object Hub extends Serializable
- object MutableConcurrentQueue
- object OneShot
- object Platform extends PlatformSpecific
- object RingBuffer
- object RingBufferArb
- object RingBufferPow2
- object SingleThreadedRingBuffer
- object StackTraceBuilder
- object UniqueKey
- object WeakConcurrentBag