pchickey edited PR #7260:
Also add language to
wasi:http/outgoing-body::finish
explaining how it interacts with pending/in-process forwarding operations.Together, these changes enable use cases where an instance forwards an incoming request's or response's body to an outgoing request/response and then terminates without waiting for the entire body to be streamed.
pchickey submitted PR review:
- how is write readiness of the output-stream defined - I believe it should not become ready for writing until all forwarded input-streams have been fully sent.
- if
future-forwarded-result
is dropped, what happens? I believe that we should continue to forward no matter what, but we need to make that explicit.- if execution traps, what happens? I think in the case of a trap we should define forwarding to stop "at some point afterwards" - I don't think we want to be on the hook to keep forwarding after a trap, nor give a guarantee that it terminates promptly.
pchickey submitted PR review:
- how is write readiness of the output-stream defined - I believe it should not become ready for writing until all forwarded input-streams have been fully sent.
- if
future-forwarded-result
is dropped, what happens? I believe that we should continue to forward no matter what, but we need to make that explicit.- if execution traps, what happens? I think in the case of a trap we should define forwarding to stop "at some point afterwards" - I don't think we want to be on the hook to keep forwarding after a trap, nor give a guarantee that it terminates promptly.
pchickey created PR review comment:
I think this should return
result<future-forwarded-result, tuple<stream-error, input-stream>>
- returns ownership of theinput stream
on failure, and says that thisoutput-stream
has already closed or somehow failed.
pchickey created PR review comment:
I don't think we should provide multiple input-streams here, there is only one that has been taken ownership of by the
forward
function so lets only give one back here. The caller can hold onto handles for all of their future-forward-results and unwrap each of them into ansome(ok(err((_error, input-stream))))
alexcrichton closed without merge PR #7260.
Last updated: Dec 23 2024 at 13:07 UTC