We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 96ddd32 commit 5fd561dCopy full SHA for 5fd561d
library/std/src/sync/mpsc/tests.rs
@@ -713,10 +713,11 @@ fn issue_39364() {
713
let t = thread::spawn(move || {
714
thread::sleep(Duration::from_millis(300));
715
let _ = tx.clone();
716
- crate::mem::forget(tx);
+ // Don't drop; hand back to caller.
717
+ tx
718
});
719
720
let _ = rx.recv_timeout(Duration::from_millis(500));
- t.join().unwrap();
721
+ let _tx = t.join().unwrap(); // delay dropping until end of test
722
723
}
0 commit comments