Stream: git-wasmtime

Topic: wasmtime / PR #7797 wasmtime: add EngineWeak which has ::...


view this post on Zulip Wasmtime GitHub notifications bot (Jan 19 2024 at 18:18):

pchickey opened PR #7797 from bytecodealliance:pch/engine_weak to bytecodealliance:main:

Engine is, internally, just an Arc<EngineInner>, so this is trivial to implement - EngineWeak is a Weak<EngineInner>.

This behavior is desirable because Engine::increment_epoch typically happens in a worker thread, which in turn requires additional machinery to discard the Engine once it is no longer needed. If instead the worker thread holds an EngineWeak, it can stop ticking when all consumers of the Engine have dropped it. This has been documented as a suggestion in increment_epoch.

For an example of additional machinery which is simplified by this change, see https://github.com/fastly/Viceroy/blob/25edee0700ec0b20b1b56db0a3a8d6f090397b3a/lib/src/execute.rs#L108-L116)

<!--
Please make sure you include the following information:

Our development process is documented in the Wasmtime book:
https://docs.wasmtime.dev/contributing-development-process.html

Please ensure all communication follows the code of conduct:
https://github.com/bytecodealliance/wasmtime/blob/main/CODE_OF_CONDUCT.md
-->

view this post on Zulip Wasmtime GitHub notifications bot (Jan 19 2024 at 18:18):

pchickey requested fitzgen for a review on PR #7797.

view this post on Zulip Wasmtime GitHub notifications bot (Jan 19 2024 at 18:18):

pchickey requested wasmtime-core-reviewers for a review on PR #7797.

view this post on Zulip Wasmtime GitHub notifications bot (Jan 19 2024 at 18:30):

fitzgen submitted PR review:

Sanity test for when it is expected to be upgradable and expected to not be?

view this post on Zulip Wasmtime GitHub notifications bot (Jan 19 2024 at 18:50):

pchickey updated PR #7797.

view this post on Zulip Wasmtime GitHub notifications bot (Jan 19 2024 at 18:50):

pchickey has enabled auto merge for PR #7797.

view this post on Zulip Wasmtime GitHub notifications bot (Jan 19 2024 at 19:36):

pchickey merged PR #7797.


Last updated: Dec 23 2024 at 13:07 UTC