@epikodelabs/streamix / createTryCommit
Function: createTryCommit()
createTryCommit<
T>(opts): () =>void
Defined in: projects/libraries/streamix/src/lib/subjects/helpers.ts:39
Create the commit function which drains the subject queue and delivers items to eligible receivers, honoring backpressure, delivery ordering, and terminal semantics.
Type Parameters
T
T
Parameters
opts
options object (see signature)
receivers
Set<StrictReceiver<T>>
ready
Set<StrictReceiver<T>>
queue
QueueItem<T>[]
setLatestValue
(v) => void
scheduleCommit?
() => void
Optional hook used by Subjects to ensure commit continuation runs on the subject's scheduler. When omitted, continuations call tryCommit() directly.
Returns
a function to attempt committing queued items
():
void
Returns
void