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

Add std::thread::add_spawn_hook. #125405

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

Conversation

m-ou-se
Copy link
Member

@m-ou-se m-ou-se commented May 22, 2024

Implementation of rust-lang/rfcs#3642

@m-ou-se m-ou-se added T-libs-api Relevant to the library API team, which will review and decide on the PR/issue. A-thread-locals Area: Thread local storage (TLS) A-thread Area: `std::thread` labels May 22, 2024
@rustbot
Copy link
Collaborator

rustbot commented May 22, 2024

r? @Amanieu

rustbot has assigned @Amanieu.
They will have a look at your PR within the next two weeks and either review your PR or reassign to another reviewer.

Use r? to explicitly pick a reviewer

@rustbot rustbot added the S-waiting-on-review Status: Awaiting review from the assignee but also interested parties. label May 22, 2024
@bors
Copy link
Contributor

bors commented Jul 20, 2024

☔ The latest upstream changes (presumably #127998) made this pull request unmergeable. Please resolve the merge conflicts.

@m-ou-se
Copy link
Member Author

m-ou-se commented Oct 24, 2024

This is now updated to match the updated RFC:

  1. The effect is now thread-local instead of global. Adding a hook only affects future child threads of the current thread.
  2. Removed the use of io::Result.
  3. Added an opt-out method to the thread builder.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
A-thread Area: `std::thread` A-thread-locals Area: Thread local storage (TLS) S-waiting-on-review Status: Awaiting review from the assignee but also interested parties. T-libs-api Relevant to the library API 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