File tree Expand file tree Collapse file tree 1 file changed +4
-4
lines changed Expand file tree Collapse file tree 1 file changed +4
-4
lines changed Original file line number Diff line number Diff line change @@ -116,7 +116,7 @@ use std::thread;
116116fn main() {
117117 let mut data = vec![1u32, 2, 3];
118118
119- for i in 0..2 {
119+ for i in 0..3 {
120120 thread::spawn(move || {
121121 data[i] += 1;
122122 });
@@ -154,7 +154,7 @@ use std::sync::Mutex;
154154fn main() {
155155 let mut data = Mutex::new(vec![1u32, 2, 3]);
156156
157- for i in 0..2 {
157+ for i in 0..3 {
158158 let data = data.lock().unwrap();
159159 thread::spawn(move || {
160160 data[i] += 1;
@@ -196,7 +196,7 @@ use std::thread;
196196fn main() {
197197 let data = Arc::new(Mutex::new(vec![1u32, 2, 3]));
198198
199- for i in 0..2 {
199+ for i in 0..3 {
200200 let data = data.clone();
201201 thread::spawn(move || {
202202 let mut data = data.lock().unwrap();
@@ -217,7 +217,7 @@ thread more closely:
217217# use std :: thread;
218218# fn main () {
219219# let data = Arc :: new (Mutex :: new (vec! [1u32 , 2 , 3 ]));
220- # for i in 0 .. 2 {
220+ # for i in 0 .. 3 {
221221# let data = data . clone ();
222222thread :: spawn (move || {
223223 let mut data = data . lock (). unwrap ();
You can’t perform that action at this time.
0 commit comments