Skip to content

Expose a non-allocating way to access the current task name. #19445

@reem

Description

@reem

Currently, std::task::name allocates a new String for the current task name, but this is unnecessary and slow.

Note: this probably requires a 'thread lifetime or a reference type specific to thread-local values, perhaps struct ThreadRef<T> { nosend: NoSend, ref: &'static T }, but I haven't really thought through all the use cases.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions