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
When using select! in a loop to receive messages from multiple sources, we should make sure that the receive call is cancellation safe to avoid losing messages. Unfortunately, EventListener is not cancellation safe. That means some implementation in our code may lose event due to the select! cancel it.
Here is the task method in watch_server.rs, and its implementation lead to events loss.
Description about the bug
When using select! in a loop to receive messages from multiple sources, we should make sure that the receive call is cancellation safe to avoid losing messages. Unfortunately,
EventListener
is not cancellation safe. That means some implementation in our code may lose event due to the select! cancel it.Here is the
task
method inwatch_server.rs
, and its implementation lead to events loss.FYI: https://docs.rs/tokio/1.28.2/tokio/macro.select.html
Version
0.4.1 (Default)
Relevant log output
No response
Code of Conduct
The text was updated successfully, but these errors were encountered: