Is tokio mutex support priority? #5942
Unanswered
wqshr12345
asked this question in
Q&A
Replies: 1 comment
-
No, it doesn't support priorities. It gives out the lock to the one who has been waiting the longest. |
Beta Was this translation helpful? Give feedback.
0 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Uh oh!
There was an error while loading. Please reload this page.
-
For example, I have 10 tasks that call mutex.lock().await, where other 9 tasks have lower priority and task A has the highest priority. I expect that when the mutex becomes available, task A should be awakened first.
Beta Was this translation helpful? Give feedback.
All reactions