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
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?
The text was updated successfully, but these errors were encountered:
blelump
changed the title
Long IDLE polling approach
Imap IDLE polling approach
Jan 12, 2022
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:
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?The text was updated successfully, but these errors were encountered: