batch
batch(callback) runs a synchronous callback and returns its result. Writes are
readable immediately, nested batches share the outer batch, and affected
consumers are notified at most once when the outer callback exits.
If the callback throws, completed writes remain committed and notifications flush before the callback error is rethrown. Pibbl event dispatches use the same batching boundary automatically.
Related types: Signal and
WritableSignal.
API details from source
Section titled “API details from source”
Runs a synchronous callback while coalescing signal notifications until the outer batch completes.
batch: <T>(callback: () => T) => TRelated API: batch.
Parameters
Section titled “Parameters”callback— Synchronous work whose signal notifications are grouped.
Returns
Section titled “Returns”The callback’s return value.
See also
Section titled “See also”View source — packages/core/src/lib/signals/graph.ts:367
Implementation guidance for agents
Section titled “Implementation guidance for agents”Read the Authoring, signals, and lifecycle companion for ownership, adaptation, failure modes, and verification. Agent start provides the version-selection workflow.
Complete minimal examples
Section titled “Complete minimal examples”- Read and update signals: Use writable, readonly, and computed values with synchronous batching. Plain source
Documentation version
Section titled “Documentation version”Documentation built with @pibbl/core 0.0.2, revision 2dccb19. ALPHA — NOT FOR PRODUCTION USE.