Boost logo

Boost :

Subject: Re: [boost] Condition Variables, POSIX signals and system time changes
From: Johan Borkhuis (johan_at_[hidden])
Date: 2012-01-12 02:20:23


> I'm reworking the timed wait interface using Boost.Chrono. In this case
> you could use a steady clock to mean a MONOTONIC clock. Unfortunately my
> refactoring did use pthread_condattr_setclock to force a monotonic clock
> while waiting on the condition. Even if this should not be the source of
> the problem as it works when you don't generate the signals, I think
> that this will be better when available. I will need some time to make
> this working but I hope I could release it for boost 1.50 :(

Looking forward to that. For the moment we have a workaround, but I will
keep an eye on changes in this area, so we can move back when this becomes

>> The demo application shows where things go right and wrong, so hopefully
>> you should be able to reproduce the issue.
> I have not understood the example completely. How do you change the time
> forward or backward? Could you point me where or how do you do? by hand?

Sorry, should have mentioned that. I change the time externally by hand,
using the date command. When I change the time backwards (so an earlier
time) the problem occurs. When I change the time forward again to a time
equal to or before the time I changed the time the application continues.

>> Again, thank you for your quick response.
> Thanks for reporting this and for the application example.
> Vicente

Thank you for your work on this.

Kind regards,
    Johan Borkhuis

Boost list run by bdawes at, gregod at, cpdaniel at, john at