You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Should outgoing-handler::handle consume its outgoing-request parameter such that it can't be sent again, or should it be possible for an application to create a single request and send it multiple times?
The text was updated successfully, but these errors were encountered:
dicej
changed the title
Should outgoing-request-write consume its parameter?
Should outgoing-handler::handle consume its parameter?
Jun 8, 2023
Roughly yes, but I think the way this concretely manifests is that if you call consume (or write) more than once on the same request/response, it returns a failure. However, as long as we have a single handle type, there's nothing stopping a component from receiving a request via call to its exported handle, consumeing this request, and then passing the same request to an imported handle function, thereby giving the callee a request that will fail when consumed the first time the callee tries to call it. If the callee is the host, the host would thus return a failure from handle. This breaks a logical contract, but, until we add back a handle representing exclusive ownership, we don't have a way to express/enforce this in Wit.
Should
outgoing-handler::handle
consume itsoutgoing-request
parameter such that it can't be sent again, or should it be possible for an application to create a single request and send it multiple times?The text was updated successfully, but these errors were encountered: