-
Notifications
You must be signed in to change notification settings - Fork 84
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Pass IDLE responses to caller. #186
Conversation
While IDLE, the server sends unilateral responses to notify the client of changes to the mailbox as they happen. Instead of always exiting the IDLE on any change, allow the caller to pass a callback function which receives the messages and returns an action to either Continue IDLE or Stop and exit. For clients wishing to use the previous behaviour, a callback_stop convenience function is provided that terminates the IDLE on any change to the mailbox.
Codecov Report
@@ Coverage Diff @@
## master #186 +/- ##
==========================================
- Coverage 77.24% 76.35% -0.90%
==========================================
Files 13 14 +1
Lines 1591 1607 +16
==========================================
- Hits 1229 1227 -2
- Misses 362 380 +18
Continue to review full report at Codecov.
|
Pipeline fail is a clippy lint |
Thank you for pushing on this! I'm hoping I'll have some time to review over the weekend — otherwise I'll get to it as soon as I can 🎉 |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Overall this looks great! I've left some comments inline, though nothing too major I don't think.
Co-authored-by: Jon Gjengset <jon@thesquareplanet.com>
…Flags. Also use it where we were previously iterating manually.
UnsolicitedResponse is not exhaustive, and open an issue if you find one that isn't handled.
Re our discussion about |
Better yet: rust-lang/rust#75744 |
I have high hopes that |
Oh, that will be nice! |
Let's maybe open a ticket to consider moving to |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I think we're finally there! Thanks for the awesome work ❤️
Picking up #130, but doing it a little differently. Implement passing IDLE responses to the caller via a callback function.
Also add an example, for #152.
This change is