haraldh opened PR #5315 from fix/wait_sleep_again
to main
:
From the documentation of
CondVar::wait_timeout
:The semantics of this function are equivalent to wait except that the thread
will be blocked for roughly no longer thandur
. This method should not be
used for precise timing due to anomalies such as preemption or platform
differences that might not cause the maximum amount of time waited to be
preciselydur
.Therefore, go to sleep again, if the thread has not slept long enough.
Signed-off-by: Harald Hoyer <harald@profian.com>
<!--
Please ensure that the following steps are all taken care of before submitting
the PR.
[ ] This has been discussed in issue #..., or if not, please tell us why
here.[ ] A short description of what this does, why it is needed; if the
description becomes long, the matter should probably be discussed in an issue
first.[ ] This PR contains test cases, if meaningful.
- [ ] A reviewer from the core maintainer team has been assigned for this PR.
If you don't know who could review this, please indicate so. The list of
suggested reviewers on the right can help you.Please ensure all communication adheres to the code of conduct.
-->
haraldh edited PR #5315 from fix/wait_sleep_again
to main
:
From the documentation of
CondVar::wait_timeout
:The semantics of this function are equivalent to wait except that the thread
will be blocked for roughly no longer thandur
. This method should not be
used for precise timing due to anomalies such as preemption or platform
differences that might not cause the maximum amount of time waited to be
preciselydur
.Therefore, go to sleep again, if the thread has not slept long enough.
Signed-off-by: Harald Hoyer <harald@profian.com>
Fixes: #5312
Obsoletes: #5314
alexcrichton submitted PR review.
alexcrichton merged PR #5315.
Last updated: Dec 23 2024 at 13:07 UTC