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

Implement detached threads #88

Merged
merged 3 commits into from
Feb 17, 2024

Conversation

GaryOderNichts
Copy link
Contributor

The AsyncTerm thread is never joined but its handle is immediately closed. This works fine on Windows, but causes issues on other platforms where threads need to be explicitly detached if never joined (pthread, wiiu).

This adds a new PltDetachThread function, which can be used instead of PltCloseThread to explictly detach a thread, requiring it to no longer be closed.

Note that this hasn't been tested on any platforms other than Wii U.
The vita code needs needs to be checked, since I'm not sure if sceKernelDeleteThread behaves like Windows (detaching the thread) or immediately terminating the thread when called.

The `AsyncTerm` thread is never joined but its handle is immediately closed. This works fine on Windows, but causes issues on other platforms where threads need to be explicitly detached if never joined (pthread, wiiu).

This adds a new `PltDetachThread` function, which can be used instead of `PltCloseThread` to explictly detach a thread, requiring it to no longer be closed.
@cgutman cgutman merged commit 9545dd7 into moonlight-stream:master Feb 17, 2024
3 checks passed
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