-
Notifications
You must be signed in to change notification settings - Fork 12
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
feat(threads): sort ThreadList
by priority
#381
feat(threads): sort ThreadList
by priority
#381
Conversation
Nice! Changes to Can we turn the example into a test (in If you feel changing that now is out of scope, I'd suggest dropping the example and we add tests later. |
149bf37
to
67a8e9c
Compare
Wdyt of 67a8e9c? |
LGTM, please squash! |
e68fd40
to
ee86666
Compare
Insert new threads in `ThreadList` based on priorities, so that the highest priority thread is the head. Within a prio the threads are ordered in FIFO.
This demonstrates how multiple threads can wait for the same lock and get unblocked by priority, and within a prio by FIFO order.
Description
Insert new threads in
ThreadList
based on priorities, so that the highest priority thread is the head.Within a priority the threads are ordered in FIFO.
This reduces priority inversions, and will facilitate proper priority inheritance in the future.
The drawback of this change is that inserting a new Id in the
ThreadList
is now more complex. Not sure if we can avoid this in any way.Issues/PRs references
Alternative to #371, which implements the
ThreadList
as pure FIFO.Open Questions
Change checklist