This is the mail archive of the
gcc-bugs@gcc.gnu.org
mailing list for the GCC project.
[Bug libstdc++/41861] [DR 887][C++0x] <condition_variable> does not use monotonic_clock
- From: "redi at gcc dot gnu.org" <gcc-bugzilla at gcc dot gnu dot org>
- To: gcc-bugs at gcc dot gnu dot org
- Date: Wed, 08 Jul 2015 07:43:40 +0000
- Subject: [Bug libstdc++/41861] [DR 887][C++0x] <condition_variable> does not use monotonic_clock
- Auto-submitted: auto-generated
- References: <bug-41861-4 at http dot gcc dot gnu dot org/bugzilla/>
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=41861
--- Comment #11 from Jonathan Wakely <redi at gcc dot gnu.org> ---
Aaron, your reply got added to Bug 887 for some reason.
Re-posting Aaron's comment here:
>Thanks. I had already patched our gcc so that gthreads cond always gets
>initialized with CLOCK_MONOTONIC, then I switched __clock_t in
>condition_variable to steady_clock. It was a very simple change and works
>well but not nearly as portable as yours.
>
>I also disabled all timed waits on mutex (gcc already has ifdef for that)
>in order to avoid problems there. In my opinion, people shouldn't be using
>timed waits on mutexes anyway, since they are not cooperatively
>interruptible. If we did need them for some reason, I would reimplement
>timed mutex in terms of condition_variable and a regular mutex.
>
>It seems strange that this is no big deal to lots of people.