Expand description
BatchSource — the multi-consumer (&self) owned-batch source.
The algebra’s third source flavor, filling the gap between the two single-consumer sources:
DrainSource—&mut self, zero-copy borrow-visitor (the*DKframe relay).FanIn’sUnpinPipesources —&self, owned async pull.BatchSource—&self, owned batch pull, safe for many concurrent drainers. A lock-free MPMC ring (proxima_core::ring::BoundedQueue) is the canonical impl: several threads can each pull a disjoint batch at once, which is what lets a drainer partition work across cores and lift the single-drainer ceiling. The single-consumer sources cannot express that —&mut selfis one owner by construction.
A consumer drives it by handing a scratch slice to fill: drain_batch(&mut [Item]) -> count. No alloc, no waker, no &mut self — legal at T0.
Traits§
- Batch
Source - A source drained in owned batches through a shared
&self, so multiple consumers may pull disjoint batches concurrently.