This is the mail archive of the gcc-bugs@gcc.gnu.org mailing list for the GCC project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

[Bug libstdc++/41861] [DR 887][C++0x] <condition_variable> does not use monotonic_clock


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.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]