-
-
Notifications
You must be signed in to change notification settings - Fork 117
Clean up Message.Reset #489
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
ce07157 to
e07929b
Compare
zenhack
left a comment
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.
Mostly looks good, a couple issues.
|
@zenhack Comments addressed. As per my comment in Matrix, I felt it was best to turn |
| // *capnp.Message will be released. This will also release any clients | ||
| // in the message's CapTable and release its Arena. | ||
| // | ||
| // The Arena in the returned message should be fast at allocating new |
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.
Not really related to this PR (no need to address here) but: Is there actually a reason for this should? Afaik there's nothing in the RPC subsystem that would make SingleSegment a problem.
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.
I always assumed it was because the PlaceArgs call might allocate lots of (potentially large) structs? In other words, it would be a case of "we're handing off control the user, so make sure we can handle whatever they do". 🤷♂️
ArenawhenMessage.Resetis calledMessage.Releaseas shortcut forMessage.Reset(nil)Message.Reset(nil)call sitesCapTableslice inMessage.