Skip to content

Tracking Issue for thread spawn hooks #132951

Open
@m-ou-se

Description

@m-ou-se

Feature gate: #![feature(thread_spawn_hook)]

This is a tracking issue for thread spawn hooks as proposed in rust-lang/rfcs#3642

Public API

// std::thread:

pub fn add_spawn_hook<F, G>(hook: F)
where
    F: 'static + Send + Sync + Fn(&Thread) -> G,
    G: 'static + Send + FnOnce();

impl Builder {
    pub fn no_hooks(mut self) -> Builder;
}

Steps / History

Unresolved Questions

Metadata

Metadata

Assignees

No one assigned

    Labels

    A-threadArea: `std::thread`A-thread-localsArea: Thread local storage (TLS)C-tracking-issueCategory: An issue tracking the progress of sth. like the implementation of an RFCF-thread_spawn_hook`#![feature(thread_spawn_hook)]`T-libs-apiRelevant to the library API team, which will review and decide on the PR/issue.

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions