Stream: git-wasmtime

Topic: wasmtime / Issue #2822 Introduce a new API that allows no...


view this post on Zulip Wasmtime GitHub notifications bot (Apr 09 2021 at 14:25):

github-actions[bot] commented on Issue #2822:

Subscribe to Label Action

cc @peterhuene

<details>
This issue or pull request has been labeled: "wasmtime:api"

Thus the following users have been cc'd because of the following labels:

To subscribe or unsubscribe from this label, edit the <code>.github/subscribe-to-label.json</code> configuration file.

Learn more.
</details>

view this post on Zulip Wasmtime GitHub notifications bot (Apr 10 2021 at 21:03):

peterhuene commented on Issue #2822:

I wonder if we should be invoking init_traps automatically when we're about to resume a fiber inside of the async machinery just in case the future moved threads. It would reduce the use case of this to only times when users explicitly move a Store and related components to another thread.

view this post on Zulip Wasmtime GitHub notifications bot (Apr 12 2021 at 08:17):

bnjbvr commented on Issue #2822:

It's a good point, and in fact it's already done automatically by wasmtime after resuming from a suspended fiber: https://github.com/bytecodealliance/wasmtime/blob/main/crates/runtime/src/traphandlers.rs#L436

Your remark makes me notice that this new API would also create a double standard: the runtime may automatically manage switching to a different thread in one case (async import causing wasm execution resuming on a different thread) when in another case one has to explicitly call the new API. The ubiquity of multithreaded future executors makes it justified in my opinion, but that's open to discussion!

view this post on Zulip Wasmtime GitHub notifications bot (Apr 15 2021 at 14:03):

alexcrichton commented on Issue #2822:

Thanks for this! I agree that it's a little odd that this might automatically happen as part of a future execution but then it doesn't automatically happen otherwise, but I agree that it's probably ok for now. Can you add documentation about this function on the multithreading page and also link the documentation on this function to the multithreading page?

view this post on Zulip Wasmtime GitHub notifications bot (Apr 16 2021 at 08:15):

bnjbvr commented on Issue #2822:

Done, thanks!


Last updated: Oct 23 2024 at 20:03 UTC