-
-
Notifications
You must be signed in to change notification settings - Fork 21
Open
Description
Hi,
this is more a question than an issue itself. The current IDLE implementation is designed in a way that the future resolves for anything that comes from the server. I am wondering then what would be best approach for long IDLE polling, where client listens continuously for any change from the server side. I was thinking of a loop:
loop {
let (idle_wait, _interrupt) = idle.wait();
let idle_result = idle_wait.await.unwrap();
match idle_result {
...
};
}
The above approach calls #wait each time and apart from that, there's a tiny possibility to miss server message when the current future is resolved and the execution is in the match
statement. What would be best approach to tackle that?
Metadata
Metadata
Assignees
Labels
No labels