Skip to main content

buffer

Function buffer 

Source
pub fn buffer(
    core: &Core,
    binding: &Arc<dyn ProducerBinding>,
    source: NodeId,
    notifier: NodeId,
    pack_fn_id: FnId,
) -> NodeId
Expand description

Buffers source DATA handles; flushes as a packed array when notifier emits DATA.

  • Source DATA: retain + push to buffer.
  • Notifier DATA: pack buffer via pack_tuple, emit, clear, release component handles.
  • Source COMPLETE: flush remaining buffer (if non-empty), then complete.
  • Either ERROR: terminate immediately, release buffered handles.
  • Notifier COMPLETE: does NOT auto-complete (keep buffering; source COMPLETE triggers final flush).