We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 202898d commit 2a057f8Copy full SHA for 2a057f8
README.md
@@ -27,7 +27,7 @@ queue.async(|| println!("World"));
27
Concurrent dispatch queues execute tasks concurrently. GCD provides global
28
concurrent queues that can be accessed through the `Queue::global` function.
29
30
-`Queue` has two methods that can simplify processing data in parallel, `apply`
+`Queue` has two methods that can simplify processing data in parallel, `foreach`
31
and `map`:
32
33
``` rust
@@ -36,7 +36,7 @@ use dispatch::{Queue, QueuePriority};
36
let queue = Queue::global(QueuePriority::Default);
37
38
let mut nums = vec![1, 2];
39
-queue.apply(&mut nums, |x| *x += 1);
+queue.foreach(&mut nums, |x| *x += 1);
40
assert!(nums == [2, 3]);
41
42
let nums = queue.map(nums, |x| x.to_string());
0 commit comments