File tree 1 file changed +4
-4
lines changed
1 file changed +4
-4
lines changed Original file line number Diff line number Diff line change @@ -116,7 +116,7 @@ use std::thread;
116
116
fn main() {
117
117
let mut data = vec![1u32, 2, 3];
118
118
119
- for i in 0..2 {
119
+ for i in 0..3 {
120
120
thread::spawn(move || {
121
121
data[i] += 1;
122
122
});
@@ -154,7 +154,7 @@ use std::sync::Mutex;
154
154
fn main() {
155
155
let mut data = Mutex::new(vec![1u32, 2, 3]);
156
156
157
- for i in 0..2 {
157
+ for i in 0..3 {
158
158
let data = data.lock().unwrap();
159
159
thread::spawn(move || {
160
160
data[i] += 1;
@@ -196,7 +196,7 @@ use std::thread;
196
196
fn main() {
197
197
let data = Arc::new(Mutex::new(vec![1u32, 2, 3]));
198
198
199
- for i in 0..2 {
199
+ for i in 0..3 {
200
200
let data = data.clone();
201
201
thread::spawn(move || {
202
202
let mut data = data.lock().unwrap();
@@ -217,7 +217,7 @@ thread more closely:
217
217
# use std :: thread;
218
218
# fn main () {
219
219
# let data = Arc :: new (Mutex :: new (vec! [1u32 , 2 , 3 ]));
220
- # for i in 0 .. 2 {
220
+ # for i in 0 .. 3 {
221
221
# let data = data . clone ();
222
222
thread :: spawn (move || {
223
223
let mut data = data . lock (). unwrap ();
You can’t perform that action at this time.
0 commit comments