Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

support priority crate? #46

Open
drewcrawford opened this issue Nov 8, 2024 · 0 comments
Open

support priority crate? #46

drewcrawford opened this issue Nov 8, 2024 · 0 comments

Comments

@drewcrawford
Copy link

Hi there. I wrote the priority crate to define a cross-platform, high-level coarse set of priority levels, primarily of interest to interactive-style applications. You can think of it as a much coarser version of the cross-platform ThreadPriorityValue type here. Currently, there's no way to attach those levels to threads, and so I am investigating the best path forward on that.

I wanted to take the temperature on adding support for its priority levels directly into this crate, presumably as a new enum case of ThreadPriority.

On a related and perhaps-sticking-point, macOS/iOS rely a lot on QoS classes for scheduling (pthread_attr_set_qos_class_np) which I think are not set by this crate. (And, there is a natural definition of priority's coarse levels in terms of coarse QoS values). So I also wanted to take the temperature on adding calls to pthread_attr_set_qos_class_np when setting a priority on the relevant platforms.

If there's no appetite for reviewing the PRs, feel free to close this issue and I can pursue another solution.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant