pub async fn wait_mesh<T>(
rx: PortReceiver<ValueMesh<T>>,
max_idle_time: Duration,
fallback: ValueMesh<T>,
reported: impl Fn(&T) -> bool,
) -> Result<ValueMesh<T>, ValueMesh<T>>Expand description
Collect an accumulated ValueMesh<T> from rx until every rank has been
reported or max_idle_time elapses with no update.
reported decides whether a rank’s current value counts as “reported” (e.g.
moved off a NotExist/Timeout placeholder). The accumulator emits the full
mesh over the target region, so completion is “every cell reported”. Returns
Ok(mesh) once all ranks are reported, or Err(mesh) carrying the latest
snapshot (or fallback if nothing arrived) on idle timeout / channel close.