Stream: general

Topic: epoch callback having a reference to the store


view this post on Zulip Marco Concetto Rudilosso (Mar 13 2023 at 21:16):

Currently the callback that you can set in https://docs.wasmtime.dev/api/wasmtime/struct.Store.html#method.epoch_deadline_callback does not have access to the store itself (nor any kind of reference to it) but only to its internal data. I do have a somehow weird use case where having access to the store could be useful: from a signal handler I would increase the epoch. When we hit the epoch deadline, I'd like to get a backtrace. This would allow me to build a very rudimentary profiler by just using https://docs.wasmtime.dev/api/wasmtime/struct.WasmBacktrace.html

Would this be okay? I'm happy to make the change, but maybe it's wrong for some reason I do not understand.


Last updated: Oct 23 2024 at 20:03 UTC