Skip to content

Documentation for LocalKey could be better worded #39841

Closed
@ghost

Description

Source: https://doc.rust-lang.org/std/thread/struct.LocalKey.html

"Initialization is dynamically performed on the first call to with() within a thread, and values support destructors which will be run when a thread exits."

It's unclear what's going on with destructors in this sentence.
The truth is: values that implement Drop will probably (on a best-effort basis) get dropped when a thread exits.

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