Stream: general

Topic: child resource design rationale


view this post on Zulip Joel Dice (Feb 01 2024 at 00:29):

Is there documentation anywhere explaining why the host traps if the guest tries to drop an owned handle to a resource when that resource has child resources? I.e. why it does that rather than e.g. use reference counting to keep the parent around (but inaccessible to the guest) until the last child is dropped?

view this post on Zulip Alex Crichton (Feb 01 2024 at 04:04):

Documentation I suspect not (but it should indeed exist), but I think the main rationale is to be conservative for now. I don't think it's unreasonable to remove the restriction myself

view this post on Zulip Lann Martin (Feb 01 2024 at 13:39):

In some cases - like outbound request headers - I believe its to avoid a copy when handing off the request to the network

view this post on Zulip Pat Hickey (Feb 01 2024 at 14:03):

In some cases in http the behavior is used to enforce that the implementation can either have back pressure associated with either consuming the body with a stream, or waiting on the trailers, but it’s never ambiguous

view this post on Zulip Pat Hickey (Feb 01 2024 at 14:04):

So that’s different than just something reference counting can cover


Last updated: Nov 22 2024 at 16:03 UTC