Closed dwhiteddsoft closed 2 years ago
In case anyone is interested this is a scope issue on the compiler (if I understand it correctly) and they way around it is the following link from async trait https://github.com/dtolnay/async-trait#non-threadsafe-futures.
Closing issue
off a trait impl I have this:
which gives me an error of: future cannot be sent between threads safely the trait
Send
is not implemented fordyn std::error::Error
required for the cast to the object typedyn Future<Output = ()> + Send
pointing to the following line:
which I will be using poll_recv in a multi-threaded fashion. All available help says I need to add Send and Sync like it says and I can only implement it in my crate which is also a compile error for only implementing things in your own crate.
Seems pretty simple. I am going to spin the IoT Hub messaging on its own thread and cannot seem to overcome this