Change the injection count of fuel in a store from u32 to u64#3048
Conversation
This commit updates the type of the amount of times to inject fuel in the `out_of_fuel_async_yield` to `u64` instead of `u32`. This should allow effectively infinite fuel to get injected, even if a small amount of fuel is injected per iteration. Closes bytecodealliance#2927 Closes bytecodealliance#3046
cfallin
left a comment
There was a problem hiding this comment.
LGTM!
Lest someone complain that u64 is still not infinite (leading to a "reboot your Boeing plane every 248 days" sort of situation), and that we instead need an out-of-band setting that indicates "forever", I did some quick math: if each injection is 1 tick (worst case) and we are limited to u64::MAX injections, at 4B ticks per second, we have 146 years of runtime. That seems reasonable!
|
... and, reading more of the issue history, I agree that a separate API might make sense for a "truly run forever" situation; it doesn't seem worth API-breakage to change the semantics here. |
Subscribe to Label Actioncc @peterhuene DetailsThis 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 |
This commit updates the type of the amount of times to inject fuel in
the
out_of_fuel_async_yieldtou64instead ofu32. This shouldallow effectively infinite fuel to get injected, even if a small amount
of fuel is injected per iteration.
Closes #2927
Closes #3046