Stream: wasmtime

Topic: ✔ Time based Interruption of function calls


view this post on Zulip Cwasi4wasm (Dec 12 2023 at 19:17):

Switching our engine to Wasmtime and i was wondering what the best way to interrupt a function call based on a timeout? Would set_epoch_deadline suffice?

view this post on Zulip Alex Crichton (Dec 12 2023 at 19:19):

that's the closest approximation, yes, you'd increment the epoch at the timeout dealine which would trigger an event in the guest

view this post on Zulip Cwasi4wasm (Dec 12 2023 at 19:23):

Awesome. Is it possible to use epoch_deadline_callback for this in your opinion?

view this post on Zulip Alex Crichton (Dec 12 2023 at 19:24):

I believe so, yeah

view this post on Zulip Cwasi4wasm (Dec 12 2023 at 19:24):

Sweet thank you!

view this post on Zulip Notification Bot (Dec 14 2023 at 14:58):

Cwasi4wasm has marked this topic as resolved.


Last updated: Nov 22 2024 at 16:03 UTC