[Author Prev][Author Next][Thread Prev][Thread Next][Author Index][Thread Index]

Re: [Libevent-users] pthread_cond_timedwait realtime clock race



On Tue, Sep 18, 2012 at 4:14 PM, David Goulet <dgoulet@xxxxxxxxx> wrote:
> -----BEGIN PGP SIGNED MESSAGE-----
> Hash: SHA512
>
> Hi everyone,
>
> I'm David from the LTTng project (http://lttng.org). I'm sharing here
> an issue we ran into. The solution could benefit the libevent project.

Hi, and thanks for the heads-up!

[...]
> After some research, we discovered a fantastic call,
> pthread_condattr_setclock() which can be used to set the condition to
> use the CLOCK_MONOTONIC hence having the guarantee to never jump in
> time between calls.
[...]

It looks like the only current user of a timed wait function in
Libevent is the unit tests.  That doesn't mean we shouldn't fix this,
though.  Anybody want to come up with a patch?

yrs,
-- 
Nick
***********************************************************************
To unsubscribe, send an e-mail to majordomo@xxxxxxxxxxxxx with
unsubscribe libevent-users    in the body.