-
Notifications
You must be signed in to change notification settings - Fork 75
Open
Description
A simple example compiles on Linux but fails on Windows:
use tokio;
use tokio_serial as serial;
#[tokio::main]
async fn main() {
let builder = serial::new("example/port", 9600);
if let Ok(stream) = serial::SerialStream::open(&builder) {
tokio::spawn(async move {
let _ = stream.writable().await;
});
}
}
This fails to compile on Windows with "*mut c_void cannot be shared between threads safely".
Perhaps this is a known limitation? I believe the cause is the difference in internal representation, and the additional "com" struct required for Windows systems. Is there a recommended workaround?
Thanks for your help! And apologies if this was already known.
edisno
Metadata
Metadata
Assignees
Labels
No labels