Skip to content

Should Mutex and Condvar respect priorities? #128231

Open
@joboet

Description

@joboet

std does not have an API for setting the thread priority, and doesn't currently support priority inheritance on the majority of platforms (Linux and Windows in particular). Given this, does it still make sense to provide priority inheritance on any platform, when it is not guaranteed, won't be used by default and cannot be relied upon when using external libraries without inspecting the code? Or wouldn't it make more sense to deal with all the priority stuff in a separate crate? This would then allow reducing the number of synchronization primitive implementations inside std (we could switch to the queue-based variant on quite some platforms), thus simplifying efforts like #128203.

Metadata

Metadata

Assignees

No one assigned

    Labels

    A-atomicArea: Atomics, barriers, and sync primitivesC-discussionCategory: Discussion or questions that doesn't represent real issues.T-libsRelevant to the library 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