Skip to content
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

Merged
merged 3 commits into from
Sep 18, 2024

Conversation

pavelsavara
Copy link
Member

  • 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
@pavelsavara pavelsavara added arch-wasm WebAssembly architecture area-Build-mono os-wasi Related to WASI variant of arch-wasm labels Sep 18, 2024
@pavelsavara pavelsavara added this to the 10.0.0 milestone Sep 18, 2024
@pavelsavara pavelsavara self-assigned this Sep 18, 2024
Copy link
Contributor

Tagging subscribers to 'arch-wasm': @lewing
See info in area-owners.md if you want to be subscribed.

@pavelsavara pavelsavara marked this pull request as ready for review September 18, 2024 12:08
@@ -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){
Copy link
Member Author

@pavelsavara pavelsavara Sep 18, 2024

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)

@pavelsavara
Copy link
Member Author

/ba-g CI timeout

@pavelsavara pavelsavara merged commit 59a096e into dotnet:main Sep 18, 2024
145 of 149 checks passed
@pavelsavara pavelsavara deleted the wasi_back_to_0_2_0 branch September 18, 2024 22:10
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
arch-wasm WebAssembly architecture area-Build-mono os-wasi Related to WASI variant of arch-wasm
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants