-
Notifications
You must be signed in to change notification settings - Fork 7.9k
app-server: thread resume subscriptions #11474
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
Conversation
5f1f275 to
8148704
Compare
fc45db4 to
9e506da
Compare
ad28e92 to
40a29cb
Compare
40a29cb to
ae124ae
Compare
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.
💡 Codex Review
Here are some automated review suggestions for this pull request.
Reviewed commit: 1ca45ea974
ℹ️ About Codex in GitHub
Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you
- Open a pull request for review
- Mark a draft as ready
- Comment "@codex review".
If Codex has suggestions, it will comment; otherwise it will react with 👍.
Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".
| .await | ||
| { | ||
| send_error = Some(err); | ||
| break; |
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.
is it a good idea to short-circuit or should we continue sending to the rest of the connections?
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.
hmm I think stopping is right - this is a single shared queue not per connection so if it's erroring no reason to continue
This stack layer makes app-server thread event delivery connection-aware so resumed/attached threads only emit notifications and approval prompts to subscribed connections.
ThreadState(subscribed_connections) and mapped subscription ids to(thread_id, connection_id).connection_closed(connection_id)plumbing (lib.rs->message_processor.rs->codex_message_processor.rs) so disconnect cleanup happens immediately.TargetedOutgoingto send requests/notifications only to subscribed connections.