badeend opened PR #8968 from badeend:immediate-stream-error-closed2
to bytecodealliance:main
:
This saves the caller from having to perform one last
poll
+read
sequence.Before this change, it would first return an empty list of bytes, which is the wasi-io equivalent of EWOULDBLOCK.
<!--
Please make sure you include the following information:
If this work has been discussed elsewhere, please include a link to that
conversation. If it was discussed in an issue, just mention "issue #...".Explain why this change is needed. If the details are in an issue already,
this can be brief.Our development process is documented in the Wasmtime book:
https://docs.wasmtime.dev/contributing-development-process.htmlPlease ensure all communication follows the code of conduct:
https://github.com/bytecodealliance/wasmtime/blob/main/CODE_OF_CONDUCT.md
-->
badeend requested wasmtime-core-reviewers for a review on PR #8968.
badeend requested fitzgen for a review on PR #8968.
alexcrichton commented on PR #8968:
Thanks! Would it be possible to add a test for this too?
badeend updated PR #8968.
badeend commented on PR #8968:
Yes!
The test includes a
std::thread::sleep
. Under Linux this shouldn't be necessary as communication over loopback devices happens synchronously. But I've thrown it in anyway just in case Windows or MacOS works differently.
alexcrichton submitted PR review.
alexcrichton merged PR #8968.
Last updated: Nov 22 2024 at 16:03 UTC