client: Replace SetOrdered with AddChannel - #3797
Open
jochumdev wants to merge 4 commits into
Open
Conversation
This reverts commit 0a97515. Signed-off-by: René Jochum <rene@jochum.dev>
stgraber
reviewed
Aug 7, 2026
jochumdev
force-pushed
the
feat/addchannel
branch
from
August 7, 2026 19:01
be7f023 to
d0dae12
Compare
stgraber
reviewed
Aug 7, 2026
| @@ -22,8 +22,8 @@ reconnecting, anything being tracked from the event stream should be re-fetched, | |||
| disconnected are not resent. | |||
Member
There was a problem hiding this comment.
Why is there a doc change in this commit?
Handlers are called concurrently so they can observe events out of order. A channel delivers them one at a time in the order they arrived and lets the reader apply backpressure. A reader that falls too far behind is dropped rather than having events silently skipped. The overflow path cancels a listener without removing it, so Disconnect has to do the removal unconditionally. Signed-off-by: René Jochum <rene@jochum.dev>
Signed-off-by: René Jochum <rene@jochum.dev>
Signed-off-by: René Jochum <rene@jochum.dev>
jochumdev
force-pushed
the
feat/addchannel
branch
from
August 7, 2026 19:16
d0dae12 to
0efbdf6
Compare
Member
Author
|
I have written a fork of |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
AddChannellets a consumer receive events in order without a goroutineper event, and since it hands back a channel it can be consumed with a
plain
for rangeloop — no extra channel and forwarding goroutine on theconsumer side.
AddHandleris untouched and incusd keeps using it for operations.A reader that falls too far behind is dropped rather than having events
silently skipped, so a stale view can't go unnoticed.