Skip to content

thread::ThreadId Display missing #52780

Open
@mitsuhiko

Description

@mitsuhiko

Currently the thread::ThreadId can only be debug rendered. That's not entirely great because it renders with the ThreadId() thing around. Right now to report the thread ID to sentry we transmute it so we can get the inner u64 out.

Would it be reasonable to have a Display implementation to get a nice string version of the integer in it? There is a bit of precedent for this in Rust: StatusCode in std::process can be displayed and so can be process IDs (which are just u32s).

Metadata

Metadata

Assignees

No one assigned

    Labels

    C-feature-requestCategory: A feature request, i.e: not implemented / a PR.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