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?
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
In some cases - like outbound request headers - I believe its to avoid a copy when handing off the request to the network
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
So that’s different than just something reference counting can cover
Last updated: Dec 23 2024 at 12:05 UTC