You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Currently it is possible (and may happen by accident) that a Client is dropped, while a port or virtual endpoint is still open.
If the port is an output, you can still send to the output without an error, but no message is actually sent. Similarly, if the port is an input, you just won't receive any messages.
I don't think that this is a memory safety issue, but it might be a source of surprising behavior. The fix would be to couple the lifetimes of ports to the Client, though this makes the API slightly more complicated.
The text was updated successfully, but these errors were encountered:
Hi @Boddlnagg, thanks for the heads up. I have spent 10 minutes thinking on that, and I have to recognise that the solution with lifetimes, and the actual implications on the user side for this change, go beyond my current understanding of lifetimes and the borrow checker.
I haven't been able to spend much time on rust during the last year, but I'll keep it in mind the next time I revisit the corresponding chapters from the Rust book.
Currently it is possible (and may happen by accident) that a
Client
is dropped, while a port or virtual endpoint is still open.If the port is an output, you can still send to the output without an error, but no message is actually sent. Similarly, if the port is an input, you just won't receive any messages.
I don't think that this is a memory safety issue, but it might be a source of surprising behavior. The fix would be to couple the lifetimes of ports to the
Client
, though this makes the API slightly more complicated.The text was updated successfully, but these errors were encountered: