Skip to content

Commit ca7066d

Browse files
committed
Comments of unwrap_or_drop test.
1 parent 00d50fe commit ca7066d

File tree

1 file changed

+1
-7
lines changed

1 file changed

+1
-7
lines changed

library/alloc/src/sync/tests.rs

+1-7
Original file line numberDiff line numberDiff line change
@@ -103,14 +103,8 @@ fn try_unwrap() {
103103

104104
#[test]
105105
fn unwrap_or_drop() {
106-
// FIXME: Is doing this kind of loop reasonable? I tested `Arc::try_unwrap(x).ok()`
107-
// and it makes this kind of assertion fail in roughly every second run somewhere
108-
// between 1000 and 5000 iterations; I feel like doing a single iteration is too
109-
// unlikely to catch anything interesting but doing too many is way too slow
110-
// for a test that wouldn't ever fail for any reasonable implementation
111-
112106
for _ in 0..100
113-
// ^ increase chances of hitting uncommon race conditions
107+
// ^ increase chances of hitting potential race conditions
114108
{
115109
let x = Arc::new(3);
116110
let y = Arc::clone(&x);

0 commit comments

Comments
 (0)