RustDDS
RustDDS copied to clipboard
Update to use mio 0.8.x
This is non-trivial, because we depend also on mio-extras crate to get mio-pollable channels, and that is not available for mio 0.7.x or 0.8.x, because of features dropped from mio. Can you make this change and submit a pull request?
Hello. I found this issue might be related to a previous Windows Problem, so I think I could post a user response here.
Months ago I accidently made RustDDS run on Windows with a minor patch. But recently when I tried it on my Windows again, it failed to work (Actually I was using it on Raspberries Linux during these months so this feedback is so late).
I made some investigation and finally found it might be Windows OS bug, which was not dealed with well by mio 0.6 (refer to mio 0.7.0, Suspect Windows UDP operations, Fix for windows selector locking mechanism and Fix udp wrong wouldblock's handling ).
I'm not 100% sure of this, since at last I find this fix is not easy to be applied on mio 0.6.23. Old UdpSocket
contains little historical config state.
// new, mio 0.7.0
pub struct UdpSocket {
internal: Arc<Mutex<Option<InternalState>>>,
io: net::UdpSocket,
}
// old, mio 0.6.0
pub struct UdpSocket {
imp: Imp,
registration: Mutex<Option<poll::Registration>>,
}
Just to let you know. Regards.
Any thing I can do to help this move forward? Mio v0.6 is no longer supported (and hasn't been for a little while).
The basic thing to do is to replace all uses of mio-0.6.x with mio-0.8 equivalents. This is otherwise straightforward, but mio-extras is only supported up to mio-0.6.x. There is a crate mio-misc , which could be used to replace mio-extras, but that need to be confirmed somehow. Can you answer if mio-misc is a suitable replacement and do any better alternatives exist?
mio-misc does not have much in the way of documentation, and its timer mechanism ("Scheduler") seems to have a non-trivial API.
While doing the upgrade, it would be also worthwhile to investigate if almost the same work could be used to bring some async support to RustDDS, so that the library users could use some async runtime (e.g. Tokio) to do asynchronous DDS operations instead of using .poll()
from mio.
RustDDS 0.8 supports both mio-0.6 and mio-0.8 at the API.