-
Notifications
You must be signed in to change notification settings - Fork 593
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
Make connection events async #1677
Make connection events async #1677
Conversation
e0ea90f
to
830b1e4
Compare
Thank you @danielmarbach, I will review this ASAP. Just FYI, I merged #1675 and rebased your PR branch on |
Once this one is in I can change the other events too if you'd like |
That would be great. From my attempt at doing this, I remember that it was the |
Is now the time to add |
My plan was to sweep through that after all the events are changed to be async as a dedicated PR and not mix things |
6eb842d
to
8c7f8f9
Compare
Are you also adding the suffix to all the other events too? |
Everything that has changed in this PR. I'll do a commit per-rename. |
Rename `OnShutdown` to `OnShutdownAsync`
_connectionBlockedAsyncWrapper.Takeover(other._connectionBlockedAsyncWrapper); | ||
_connectionUnblockedAsyncWrapper.Takeover(other._connectionUnblockedAsyncWrapper); | ||
_connectionShutdownAsyncWrapper.Takeover(other._connectionShutdownAsyncWrapper); | ||
// TODO Why are other wrappers not taken over? |
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.
There is only one wrapper that is missing from this list (_consumerAboutToBeRecoveredAsyncWrapper
). The other wrappers are in the AutorecoveringConnection
class, which remains the same instance when a connection is recovered. The reason TakeOver
is necessary is that the inner Connection
instance is a new one during connection recovery.
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.
Renames are complete, I'll merge this once CI passes. Thanks!
Raised the PR for the session event #1679 |
Proposed Changes
Follow through on discussion in #1675 (comment)
@lukebakken mentioned his original intent was to make the events async across the board but stopped.
This PR would align the connection API surface
Types of Changes
What types of changes does your code introduce to this project?
Put an
x
in the boxes that applyChecklist
Put an
x
in the boxes that apply. You can also fill these out after creatingthe PR. If you're unsure about any of them, don't hesitate to ask on the
mailing list. We're here to help! This is simply a reminder of what we are
going to look for before merging your code.
CONTRIBUTING.md
documentFurther Comments
If this is a relatively large or complex change, kick off the discussion by
explaining why you chose the solution you did and what alternatives you
considered, etc.