This is the mail archive of the
libstdc++@gcc.gnu.org
mailing list for the libstdc++ project.
[PATCH 0/5] Make std::future::wait_* use std::chrono::steady_clock when required
- From: Mike Crowe <mac at mcrowe dot com>
- To: libstdc++ at gcc dot gnu dot org, gcc-patches at gcc dot gnu dot org
- Cc: Mike Crowe <mac at mcrowe dot com>
- Date: Sun, 7 Jan 2018 20:55:27 +0000
- Subject: [PATCH 0/5] Make std::future::wait_* use std::chrono::steady_clock when required
- Authentication-results: sourceware.org; auth=none
This patch series was originally submitted back in September at
https://gcc.gnu.org/ml/libstdc++/2017-09/msg00083.html which ended up
as https://patchwork.ozlabs.org/cover/817379/ . The patches received
no comments at all, which may mean that they are perfect or that they
are so bad that no-one knew where to start with criticising them. It
would be good to know which. :)
The patches are unchanged from last time, but I have corrected a typo
in one of the commit messages. The original cover message follows.
This is a first attempt to make std::future::wait_until and
std::future::wait_for make correct use of
std::chrono::steady_clock/CLOCK_MONOTONIC. It also makes
std::future::wait_until react to changes to CLOCK_REALTIME during the
wait, but only when passed a std::chrono::system_clock time point.
Prior to these patches, the situation is similar to that described at
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=41861 for
std::condition_variable, but with the benefit that this time the bug can be
fixed entirely within libstdc++.
(I've omitted the ChangeLog entries for now, since I don't believe that
this is ready to be accepted in its current form.)
Mike Crowe (5): Improve libstdc++-v3 async test libstdc++ futex: Use
FUTEX_CLOCK_REALTIME for wait libstdc++ futex: Support waiting on
std::chrono::steady_clock directly libstdc++ atomic_futex: Use
std::chrono::steady_clock as reference clock Extra async tests, not
for merging
libstdc++-v3/include/bits/atomic_futex.h | 74 ++++++++++++++-
libstdc++-v3/src/c++11/futex.cc | 48 +++++++---
libstdc++-v3/testsuite/30_threads/async/async.cc | 112 +++++++++++++++++++++++
3 files changed, 217 insertions(+), 17 deletions(-)
--
2.11.0