Skip to content

Commit

Permalink
Auto merge of rust-lang#2276 - RalfJung:join, r=RalfJung
Browse files Browse the repository at this point in the history
make sure a thread is joined

Not sure how that can fail given that preemption is disabled but whatever...
  • Loading branch information
bors committed Jun 27, 2022
2 parents 4ce026f + fb186a2 commit 99afff9
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion tests/pass/concurrency/sync_nopreempt.rs
Original file line number Diff line number Diff line change
Expand Up @@ -46,7 +46,7 @@ fn check_rwlock_unlock_bug1() {

// Make a waiting writer.
let l2 = l.clone();
thread::spawn(move || {
let t = thread::spawn(move || {
let mut w = l2.write().unwrap();
*w += 1;
});
Expand All @@ -59,6 +59,7 @@ fn check_rwlock_unlock_bug1() {
thread::yield_now();
assert_eq!(*r2, 0);
drop(r2);
t.join().unwrap();
}

fn check_rwlock_unlock_bug2() {
Expand Down

0 comments on commit 99afff9

Please sign in to comment.