MCPcopy Index your code
hub / github.com/AI45Lab/Code / run_ordered_parallel

Function run_ordered_parallel

core/src/ordered_parallel.rs:32–44  ·  view source on GitHub ↗
(
    items: Vec<I>,
    run: F,
)

Source from the content-addressed store, hash-verified

30
31#[cfg(test)]
32pub(crate) async fn run_ordered_parallel<I, F, Fut, T>(
33 items: Vec<I>,
34 run: F,
35) -> Vec<OrderedParallelResult<T>>
36where
37 I: Send + 'static,
38 F: Fn(usize, I) -> Fut + Clone + Send + 'static,
39 Fut: Future<Output = T> + Send + 'static,
40 T: Send + 'static,
41{
42 let item_count = items.len();
43 run_ordered_parallel_with_limit(items, item_count.max(1), run).await
44}
45
46pub(crate) async fn run_ordered_parallel_with_limit<I, F, Fut, T>(
47 items: Vec<I>,

Calls 2

lenMethod · 0.45

Tested by

no test coverage detected