FiberSlotModule

Creates and clears FiberSlot`2 and KeyedFiberSlot`3 values.

Summary

NameSignatureSynopsis
Operations
makeFiberSlot.make ()Creates an empty slot for Flow.forkReplacing.
makeKeyedFiberSlot.makeKeyed ()Creates an empty keyed slot for Flow.forkReplacingKey.
interruptFiberSlot.interrupt slotInterrupts the slot's fiber, if any, and waits for its cleanup.
interruptAllFiberSlot.interruptAll slotsInterrupts every fiber in a keyed slot and waits for their cleanup.
countFiberSlot.count slotsReturns the number of keys whose fiber is still running.

Operations

kind:member

make

FiberSlot.make ()
Member
Creates an empty slot for Flow.forkReplacing.

Parameters

NameTypeDescription
unit

Returns

Flow<'env, 'none, FiberSlot<'error, 'value>>
kind:member

makeKeyed

FiberSlot.makeKeyed ()
Member
Creates an empty keyed slot for Flow.forkReplacingKey.

Parameters

NameTypeDescription
unit

Returns

Flow<'env, 'none, KeyedFiberSlot<'key, 'error, 'value>>
kind:member

interrupt

FiberSlot.interrupt slot
Member
Interrupts the slot's fiber, if any, and waits for its cleanup.

Parameters

NameTypeDescription
slotFiberSlot<'error, 'value>The slot to clear.

Returns

Flow<'env, 'none, unit>
kind:member

interruptAll

FiberSlot.interruptAll slots
Member
Interrupts every fiber in a keyed slot and waits for their cleanup.

Parameters

NameTypeDescription
slotsKeyedFiberSlot<'key, 'error, 'value>The keyed slot to clear.

Returns

Flow<'env, 'none, unit>
kind:member

count

FiberSlot.count slots
Member
Returns the number of keys whose fiber is still running.

Parameters

NameTypeDescription
slotsKeyedFiberSlot<'key, 'error, 'value>The keyed slot.

Returns

Flow<'env, 'none, int>