Skip to content

Commit 1ac1dd7

Browse files
committed
add comments about not unlocking in test
1 parent 1a3ad13 commit 1ac1dd7

File tree

1 file changed

+4
-0
lines changed

1 file changed

+4
-0
lines changed

tests/pass/concurrency/windows_condvar_shared.rs

+4
Original file line numberDiff line numberDiff line change
@@ -60,6 +60,8 @@ fn all_shared() {
6060
assert_ne!(r, 0);
6161

6262
println!("exclusive waiter {i} reacquired lock");
63+
64+
// unlocking is unnecessary because the lock is never used again
6365
}));
6466
}
6567

@@ -125,6 +127,8 @@ fn shared_sleep_and_exclusive_lock() {
125127
assert_ne!(r, 0);
126128

127129
println!("shared waiter {i} reacquired lock");
130+
131+
// unlocking is unnecessary because the lock is never used again
128132
}));
129133
}
130134

0 commit comments

Comments
 (0)