iddm / thread-priority

A simple Cross-platform thread schedule and priority library for rust.
MIT License
110 stars 20 forks source link

Fix mapping of Crossplatform Priority to Linux Nice #32

Closed arthurprs closed 1 year ago

arthurprs commented 1 year ago

Mapping a [0..100] priority into niceness [-20..20] needs reversing the ratio, as the lowest nice is actually the highest priority.

Fixes #31

iddm commented 1 year ago

Thank you for your contribution. I have already made the corresponding changes in my private rewrite but didn't have time to come back and maintain the "old" crate.

arthurprs commented 1 year ago

Thanks. Could you create a new crates.io release that includes this fix?

iddm commented 1 year ago

Sorry, there is a test which is required to be fixed: https://github.com/vityafx/thread-priority/actions/runs/6485489782/job/17611664873

Can you fix it please?

arthurprs commented 1 year ago

That failure doesn't seem related to this PR, is it? It's hard for me to help on that one as I don't have access to a Mac environment.

iddm commented 1 year ago

The new version was published, 0.15.