Skip to content

Commit 99afff9

Browse files
committed
Auto merge of rust-lang#2276 - RalfJung:join, r=RalfJung
make sure a thread is joined Not sure how that can fail given that preemption is disabled but whatever...
2 parents 4ce026f + fb186a2 commit 99afff9

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

tests/pass/concurrency/sync_nopreempt.rs

+2-1
Original file line numberDiff line numberDiff line change
@@ -46,7 +46,7 @@ fn check_rwlock_unlock_bug1() {
4646

4747
// Make a waiting writer.
4848
let l2 = l.clone();
49-
thread::spawn(move || {
49+
let t = thread::spawn(move || {
5050
let mut w = l2.write().unwrap();
5151
*w += 1;
5252
});
@@ -59,6 +59,7 @@ fn check_rwlock_unlock_bug1() {
5959
thread::yield_now();
6060
assert_eq!(*r2, 0);
6161
drop(r2);
62+
t.join().unwrap();
6263
}
6364

6465
fn check_rwlock_unlock_bug2() {

0 commit comments

Comments
 (0)