Skip to content

Allow tearing down thread-allocated space from another thread #3176

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

Closed
jrvidal opened this issue Dec 2, 2022 · 1 comment · Fixed by #3177
Closed

Allow tearing down thread-allocated space from another thread #3176

jrvidal opened this issue Dec 2, 2022 · 1 comment · Fixed by #3177

Comments

@jrvidal
Copy link
Contributor

jrvidal commented Dec 2, 2022

Motivation

👋 Hello again. It turns out that, in our use case, we don't fully control the workers so we don't always have the chance to cleanly tear down thread-specific space with __wbindgen_thread_destroy.

Proposed Solution

The bare minimum would be to expose __stack_alloc together with __tls_base and accept explicit arguments for those parameters in __wbindgen_thread_destroy. That way, a "leader" thread could perform the tear down (acting like a sort of scheduler).

Alternatives

Do nothing. This goes deeper and deeper into accommodating thread-related use cases without guarantees of stability and no clear prospects on how Rust+Wasm+threads should/could look like.

@jrvidal
Copy link
Contributor Author

jrvidal commented Dec 2, 2022

This time we went ahead and explored a potential solution: #3177

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging a pull request may close this issue.

1 participant