-
Notifications
You must be signed in to change notification settings - Fork 12.9k
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
Condvar: implement wait_timeout for targets without threads #134389
base: master
Are you sure you want to change the base?
Conversation
This seems reasonable to me but since this is new user-visible behavior, requesting libs-api to take a look. @rustbot label +I-libs-api-nominated |
This always falls back to sleeping since there is no way to notify a condvar on a target without threads.
3ccd3fe
to
45c7ddf
Compare
There was a misunderstanding about buffering in Condvars. Indeed the documentation states:
Thus my previous approach using a counter makes no sense and indeed However, I have modified the PR and description accordingly. |
This always falls back to sleeping since there is no way to notify a condvar on a target without threads.
Even on a target that has no threads the following code is a legitimate use case: