[PATCH 1/2] condition_variable: Report early wakeup of wait_until as no_timeout

Jonathan Wakely jwakely@redhat.com
Wed Aug 1 15:41:00 GMT 2018


On 20/07/18 17:49 +0100, Mike Crowe wrote:
>As currently implemented, condition_variable always ultimately waits
>against std::chrono::system_clock. This clock can be changed in arbitrary
>ways by the user which may result in us waking up too early or too late
>when measured against the caller-supplied clock.
>
>We can't (yet) do much about waking up too late[1], but
>if we wake up too early we must return cv_status::no_timeout to indicate a
>spurious wakeup rather than incorrectly returning cv_status::timeout.
>
>[1] https://gcc.gnu.org/bugzilla/show_bug.cgi?id=41861

Committed to trunk, thanks very much.

I reformatted it slightly, to keep the line below 80 columns. The
version I committed is attached.

-------------- next part --------------
A non-text attachment was scrubbed...
Name: patch.txt
Type: text/x-patch
Size: 3900 bytes
Desc: not available
URL: <http://gcc.gnu.org/pipermail/libstdc++/attachments/20180801/90330991/attachment.bin>


More information about the Libstdc++ mailing list