Skip to main content

run_ordered

Function run_ordered 

Source
pub fn run_ordered<T: Sync, R: Send>(run: OrderedRun<'_, T, R>)
Expand description

What: Run every item and report in input order. Why: See the module description. A panic in a worker ends the run: the channel closes when every worker is gone, the consumer stops waiting, and the scope raises the worker’s panic on the calling thread.

In TS you’d write (pseudocode):

await runOrdered({ items, lanes, workers, work, onEvent });

§Panics

When a lane names an index that is not an item, or the lanes do not cover every item exactly once.