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

Run TLS destructors for main thread on UNIX platforms #133819

Open
wants to merge 3 commits into
base: master
Choose a base branch
from

Conversation

surban
Copy link
Contributor

@surban surban commented Dec 3, 2024

This calls TLS destructors on UNIX platforms other than Linux when the main thread exits. This is done by registering a process-wide atexit handler.

r? joboet

This calls TLS destructors on UNIX platforms other than Linux
when the main thread exits. This is done by registering a
process-wide atexit handler.
@rustbot rustbot added S-waiting-on-review Status: Awaiting review from the assignee but also interested parties. T-libs Relevant to the library team, which will review and decide on the PR/issue. labels Dec 3, 2024
@rust-log-analyzer

This comment has been minimized.

@joboet
Copy link
Member

joboet commented Dec 4, 2024

Hi, T-libs! Are you okay with this behaviour change? This makes platforms like musl behave the same way as glibc; they will now run TLS destructors both when main returns and when exit is called instead of only running them when a thread exits.

@rustbot label +I-libs-nominated

@rustbot rustbot added the I-libs-nominated Nominated for discussion during a libs team meeting. label Dec 4, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
I-libs-nominated Nominated for discussion during a libs team meeting. S-waiting-on-review Status: Awaiting review from the assignee but also interested parties. T-libs Relevant to the library team, which will review and decide on the PR/issue.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants