Skip to content
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

call messages: let the transport release the cap table #314

Merged
merged 1 commit into from
Oct 1, 2022

Conversation

zenhack
Copy link
Contributor

@zenhack zenhack commented Sep 30, 2022

For two reasons:

  1. As clarified in Clarify comments #308, the transport will release these when the message is freed, so we don't need to do this here to avoid a leak, and letting the transport deal with it is simpler.
  2. I smell a race condition: this releases the clients before the message is actually on the wire. I think it is actually fine, because I think by this time the message is already in the queue and so is morally on the wire, but it's a bit harder to reason about, and makes me nervous.

I believe there is no functional change here.

For two reasons:

1. As clarified in capnproto#308, the transport will release these when the
   message is freed, so we don't need to do this here to avoid a leak,
   and letting the transport deal with it is simpler.
2. I smell a race condition: this releases the clients before the
   message is actually on the wire. I *think* it is actually fine,
   because I think by this time the message is already in the queue and
   so is morally on the wire, but it's a bit harder to reason about,
   and makes me nervous.

I *believe* there is no functional change here.
@zenhack zenhack merged commit 98a31ca into capnproto:main Oct 1, 2022
@zenhack zenhack deleted the remove-unnecessary-release branch October 1, 2022 20:15
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants