Skip to content

Should outgoing-handler::handle consume its parameter? #816

Open

Description

@dicej

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?

Activity

  1. changed the title [-]Should `outgoing-request-write` consume its parameter?[/-] [+]Should `outgoing-handler::handle` consume its parameter?[/+] on Jun 8, 2023
  2. lukewagner commented on Jun 12, 2023

    @lukewagner
    Member

    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.

  3. added
    S-inactiveStatus: no discussion in over a year. Records silence during triage; not a proposal to close.
    on Aug 20, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    P-httpProposal: wasi-httpS-inactiveStatus: no discussion in over a year. Records silence during triage; not a proposal to close.

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions