Skip to content

@ThreadLocal wanted #71556

Open
Open
@endeavour42

Description

@endeavour42

Motivation

We have @TaskLocal, a similar @ThreadLocal would be useful at times we need to work with thread local variables. It would make the code both safer, shorter and nicer.

Proposed solution

Implement @ThreadLocal similar to how @TaskLocal is implemented

Alternatives considered

Continue to rely on unsafe pthread APIs (pthread_key_create, pthread_setspecific, pthread_getspecific) to work with thread locals.

Additional information

No response

Metadata

Metadata

Assignees

No one assigned

    Labels

    concurrency runtimeFeature: umbrella label for concurrency runtime featuresfeatureA feature request or implementation

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions