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

Disable pthread_exit for now #366

Merged
merged 1 commit into from
Dec 21, 2022
Merged

Disable pthread_exit for now #366

merged 1 commit into from
Dec 21, 2022

Conversation

yamt
Copy link
Contributor

@yamt yamt commented Dec 19, 2022

The current wasi-threads has no thread-exit functionality. Thus it isn't straightforward to implement pthread_exit without leaking thread context. This commit simply disables pthread_exit for now.

Also, instead of abusing wasi_proc_exit for thread exit, make wasi_thread_start return.

Note: wasi_proc_exit is supposed to terminate all threads in the "process", not only the calling thread.

Note: Depending on the conclusion of the discussion about wasi_thread_exit, we might revisit this change later.

References:
WebAssembly/wasi-threads#7 WebAssembly/wasi-threads#17

@yamt
Copy link
Contributor Author

yamt commented Dec 19, 2022

an alternative to #364

The current wasi-threads has no thread-exit functionality.
Thus it isn't straightforward to implement pthread_exit
without leaking thread context. This commit simply disables
pthread_exit for now.

Also, instead of abusing `wasi_proc_exit` for thread exit,
make `wasi_thread_start` return.

Note: `wasi_proc_exit` is supposed to terminate all threads
in the "process", not only the calling thread.

Note: Depending on the conclusion of the discussion about
`wasi_thread_exit`, we might revisit this change later.

References:
WebAssembly/wasi-threads#7
WebAssembly/wasi-threads#17
Copy link
Collaborator

@abrown abrown left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM as a temporary fix until WebAssembly/wasi-threads#7 is resolved.

@abrown abrown merged commit b36b752 into WebAssembly:main Dec 21, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants