-
-
Notifications
You must be signed in to change notification settings - Fork 115
Simplify clientHook's refcounting scheme. #496
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
There is no actual reason why we need separate refcounts for calls and clients. In preparation for generally unifying the refcounting in this library, I've decided we should just merge them.
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.
LGTM. Note that I have not looked at CI failure.
...because fewer special cases are better. This also resolves everything but the documentation for capnproto#423. One of the tests had to be reworked a bit because the exact sequence of messages was a bit different, but still correct.
I merged in #502, which fixed the test failures locally, so hopefully it should do so in CI as well. That PR should be reviewed & merged first. |
#348, re-running. |
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.
Approved (pending questions in #502)
This can't possibly have any effect, since we close the same channel immediately above. The close used to be conditional, so it presumably made more sense then.
Per my long rambly rubber-ducking session on matrix, there is a reason for having two separate refcounts: if refs hits zero Client.Release() will block on calls hitting zero before returning. This patch breaks that, oops. Closing. |
There is no actual reason why we need separate refcounts for calls and clients. In preparation for generally unifying the refcounting in this library, I've decided we should just merge them.