Expand description
An Arc-backed batch newtype whose contents can be shared across timely runtimes.
Differential’s default spines reference-count their batches with Rc, which is worker-local.
Sharing an arrangement with another runtime (a reader on a different worker thread) needs the
batches behind an Arc so a batch whose contents are Send + Sync can be read from that other
thread.
The blanket impl Trait for Arc<B> that would express this lives outside this crate: both Arc
and differential’s Batch/Builder/Merger/Cursor traits are foreign, so the orphan rule
forbids it here. ArcBatch is a local newtype around Arc<B> that carries those impls
instead. The impls delegate straight through to the inner batch, so ArcBatch<B> behaves
exactly like B except that its handle is atomically reference counted.
This mirrors differential’s own rc_blanket_impls (for Rc<B>), swapping in Arc. Keeping it
here as a newtype lets cross-thread arrangement sharing build against a released
differential-dataflow, with no differential-side Arc batch impls required.
Structs§
- ArcBatch
- An
Arc-backed batch, shareable across threads whenB’s contents areSend + Sync. - ArcBatch
Cursor - Cursor over an
ArcBatch, delegating to the inner batch’s cursor. - ArcBuilder
- Builds
ArcBatches, delegating to the inner batch’s builder. - ArcMerger
- Merges
ArcBatches, delegating to the inner batch’s merger.