Stream: git-wasmtime

Topic: wasmtime / PR #8229 Use a multi-threaded Tokio runtime as...


view this post on Zulip Wasmtime GitHub notifications bot (Mar 24 2024 at 18:53):

alexcrichton opened PR #8229 from alexcrichton:fix-blocking-io-and-timers to bytecodealliance:main:

This commit fixes a bug that was introduced in #8190 and brought up on [Zulip]. In #8190 there was a subtle change in how Tokio and the CLI are managed, namely that a Tokio runtime is installed at the start of the CLI to avoid entering/exiting the runtime on each blocking call. This had a small performance improvement relative to entering/exiting on each blocking call. This meant, though, that calls previously blocked with Runtime::block_on and now block with Handle::block_on. The [documentation of Handle::block_on][doc] has a clause that says that for single-threaded runtimes I/O and timers won't work.

To fix this issue I've switch the fallback runtime to a multi-threaded runtime to ensure that I/O and timers continue to work.

[Zulip]: https://bytecodealliance.zulipchat.com/#narrow/stream/219900-wasi/topic/Wasi-http.20requests.20hang/near/429187256
[doc]: https://docs.rs/tokio/latest/tokio/runtime/struct.Handle.html#method.block_on

<!--
Please make sure you include the following information:

Our development process is documented in the Wasmtime book:
https://docs.wasmtime.dev/contributing-development-process.html

Please ensure all communication follows the code of conduct:
https://github.com/bytecodealliance/wasmtime/blob/main/CODE_OF_CONDUCT.md
-->

view this post on Zulip Wasmtime GitHub notifications bot (Mar 24 2024 at 18:53):

alexcrichton requested fitzgen for a review on PR #8229.

view this post on Zulip Wasmtime GitHub notifications bot (Mar 24 2024 at 18:53):

alexcrichton requested wasmtime-core-reviewers for a review on PR #8229.

view this post on Zulip Wasmtime GitHub notifications bot (Mar 24 2024 at 20:22):

peterhuene submitted PR review.

view this post on Zulip Wasmtime GitHub notifications bot (Mar 25 2024 at 15:12):

alexcrichton merged PR #8229.


Last updated: Oct 23 2024 at 20:03 UTC