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
{{ message }}
This repository has been archived by the owner on Nov 15, 2019. It is now read-only.
Summarising again, the uniform idiom should be to just read in a loop. If you collect many msgs and only one is meant to be handled by the current state, then pass the remainder over to the next state. Similarly never re-register to write (or avoid it unless impossible to do without it). Just write instead. Start with registering once for read and write with edge notification and work your way from there.
This avoids forgetting the correct re-registerations and undoing previous ones and doing new ones etc. Doing all that is utterly nuanced, error prone, causes breakages easily during code changes and makes it difficult to reason about properly in reviews.
The text was updated successfully, but these errors were encountered:
More details here in the review comment.
Summarising again, the uniform idiom should be to just read in a loop. If you collect many msgs and only one is meant to be handled by the current state, then pass the remainder over to the next state. Similarly never re-register to write (or avoid it unless impossible to do without it). Just write instead. Start with registering once for read and write with edge notification and work your way from there.
This avoids forgetting the correct re-registerations and undoing previous ones and doing new ones etc. Doing all that is utterly nuanced, error prone, causes breakages easily during code changes and makes it difficult to reason about properly in reviews.
The text was updated successfully, but these errors were encountered: