Stream: git-wasmtime

Topic: wasmtime / Issue #860 Add ability to stop running `wasmti...


view this post on Zulip Wasmtime GitHub notifications bot (Mar 09 2020 at 16:10):

moonheart08 commented on Issue #860:

I personally probably have one of the sillier use-cases for the ability to pause/resume (I wanted to put WASM computers in Minecraft as an exercise), but it gives a few very important use cases for Wasmtime some light:
1) The traditional browser use-case of having separate isolated Wasmtime VMs up and going at once
2) The embedded into another application use-case in, say, a game, where the VM hanging the place would be disastrous, and you're under a strict schedule to get each frame out on time (and as such need a watchdog system, where each VM gets a per-frame budget of how much it gets to execute before pausing)

view this post on Zulip Wasmtime GitHub notifications bot (Mar 09 2020 at 17:13):

fitzgen commented on Issue #860:

Note that pausing is harder than stopping because you have to save the execution state (stack and all that) so that you can pick it back up again later. We want this eventually since wasm will eventually get stack switching, but we can probably support interrupting and stopping long-running wasm modules sooner.

In addition to the translate loop header stuff, what we would need is a timer thread or something that sets a flag once a module has taken too long, and then the loop header (and function prologues!) would check that flag and do a custom interrupt trap if it is set.

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

sunfishcode closed Issue #860:

Once a wasmtime::Instance in created the start function will be run. This may lead to the current thread being blocked for a long time. It would be helpful to have the ability to stop or pause an wasmtime::Instance while it is running.


Last updated: Oct 23 2024 at 20:03 UTC