Files
wasmtime/crates
Jonathan Coates f19d8cc851 Run a callback when the interruption epoch is reached (#4152)
* Run a callback when the interruption epoch is reached

Adds Store::epoch_deadline_callback. This accepts a callback which, when
invoked, can mutate the store's contents. The callback can either return
an error (in which case we trap) or return a delta which we'll use to
set the new epoch deadline.

* Add a basic test for epoch interruption callback

* Some small nits

 - Remove use of &mut in the pattern match
 - Return both yields and state from run_and_count_yields_or_trap in
   test code and assert on them separately.
 - Add a test for trapping on a state failure.
2022-05-16 07:28:23 -05:00
..
2022-05-05 13:43:02 -05:00
2022-05-05 13:43:02 -05:00
2022-05-05 13:43:02 -05:00
2022-05-05 13:43:02 -05:00
2022-05-05 13:43:02 -05:00
2022-05-05 13:43:02 -05:00
2022-05-05 13:43:02 -05:00
2022-05-05 13:43:02 -05:00
2022-05-05 13:43:02 -05:00
2022-05-05 13:43:02 -05:00
2022-05-05 13:43:02 -05:00