Closed
Description
Discovered while discussing rust-lang/unsafe-code-guidelines#380, probably related to rust-lang/unsafe-code-guidelines#148.
This code (playground):
use std::thread;
use futures::{channel::mpsc, executor::block_on, sink::SinkExt, stream::StreamExt};
async fn send_sequence(n: u32, mut sender: mpsc::Sender<u32>) {
for x in 0..n {
sender.send(n - x).await.unwrap();
}
}
fn main() {
let (tx, rx) = mpsc::channel(1);
let t = thread::spawn(move || block_on(send_sequence(20, tx)));
let _list: Vec<_> = block_on(rx.collect());
t.join().unwrap();
}
fails under Miri.
Metadata
Metadata
Assignees
Labels
No labels