-
Notifications
You must be signed in to change notification settings - Fork 4.7k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
[WASI] ownsPollable parameter to RegisterWasiPollable, downgrade dependencies #107978
Conversation
pavelsavara
commented
Sep 18, 2024
- add ownsPollable to RegisterWasiPollable
- revert WASI APIs to version 0.2.0 to match libc until fix lands in SDK we use
- add ownsPollable to RegisterWasiPollable
Tagging subscribers to 'arch-wasm': @lewing |
@@ -178,7 +180,9 @@ public void ResolveAndDispose() | |||
|
|||
// no need to unregister the holder from s_pollables, when this is called | |||
isDisposed = true; | |||
pollable.Dispose(); | |||
if (ownsPollable){ |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This is the interesting part.
Related: The new wit-bindgen doesn't generate finalizers anymore. That's good because resources can't be disposed in random order.
Related: when we take pollable handles from libc
internals, they are still owned by libc
and we should not dispose them here. That's why the new parameter, which will be used in sockets PR
And to be able to use pollable handles from libc
we have to match the component interface version (until tooling is fixed)
/ba-g CI timeout |