-
Notifications
You must be signed in to change notification settings - Fork 79
Closed
Description
I am in the process of moving swayipc from async-std to async-io. While running the unit tests I encountered tests failing with io::ErrorKind::WouldBlock. After re-running the current tests with the latest version of async-std I encountered the same behaviour (since async-std moved to async-io). The unit tests run without failing on async-std version 1.5 since this is the last version using mio-uds. I extracted an example on how to reproduce this bug:
use async_io::Async;
use futures_lite::future;
use std::os::unix::net::UnixStream;
use std::thread;
fn main() {
let mut handles = Vec::new();
for _ in 1..100 {
let handle = thread::spawn(|| {
future::block_on(async {
Async::<UnixStream>::connect("pathtosomeunixsocket").await
})
});
handles.push(handle);
}
for handle in handles {
if let Err(error) = handle.join().unwrap() {
dbg!(error);
}
}
}Metadata
Metadata
Assignees
Labels
No labels