Skip to main content

fanout_node

Function fanout_node 

Source
pub fn fanout_node<State, Update>(
    target: impl Into<NodeId>,
    args: impl IntoIterator<Item = Value>,
) -> impl Fn(State, NodeContext) -> NodeFuture<Update> + Send + Sync + 'static
where State: Send + 'static, Update: Send + 'static,
Expand description

A node that fans out to target once per arg, delivering each arg through NodeContext::send_arg.

This is the map-reduce / parallel-tool primitive: it emits one Send per argument, so target is scheduled once for each work item with its own per-invocation input.