-
Notifications
You must be signed in to change notification settings - Fork 814
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
PTHREAD_PRIO_INHERIT seems to result in starvation #5023
Labels
Comments
Thank-you for the detailed repro. It is always appreciated. The thread starvation didn't get better on WSL1 between 18363 and 21370. It is better on WSL2, natch. |
This issue has been automatically closed since it has not had any activity for the past year. If you're still experiencing this issue please re-file this as a new issue or feature request. Thank you! |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Please fill out the below information:
ver
at a Windows Command Prompt)Windows:
10.0.18363.720
Distro:
Ubuntu-18.04
Here is a simple case:
mutex_priority.cpp
compile:
g++ -pthread -std=c++11 mutex_priority.cpp
run:
./a.out
Work threads ran very well at first.
After 3 seconds, only one worker thread printed the count and the other workers never awoke as if they were starving.
Commenting the line
pthread_mutexattr_setprotocol(&attr, PTHREAD_PRIO_INHERIT);
fixed it.I've checked #1006 which was tagged
fixedin1809
and got a bit puzzled.Could someone help?
thx
The text was updated successfully, but these errors were encountered: