[Xcb] Bug#496715: Bug#496715: Bug#496715: libpthread-stubs: Should provide more pthread_* functions

Josh Triplett josh at joshtriplett.org
Sun Oct 11 14:35:06 PDT 2009


On Sun, Oct 11, 2009 at 09:59:33PM +0200, Samuel Thibault wrote:
> Remi Denis-Courmont, le Sun 11 Oct 2009 12:11:50 +0200, a écrit :
> > ----- Message d'origine -----
> > > Here is a patch that adds only pthread_condattr_init/destroy,
> > > pthread_cond_timedwait, pthread_exit, and makes both cond_*wait abort
> > > instead of just returning 0.
> > 
> > I would expect cond_timedwait to sleep for the specified interval rather than abort (though sleeping in a portable way is not completely trivial). No?
> 
> The problem is that we don't have an example where an application
> would actually need that behavior.  If the application is waiting for
> something that can only be signaled by another thread (that's what
> condition variables do) while threads are not actually used, there's
> probably something wrong in it and it's probably better to just report
> it accurately.

I can easily imagine an application that wants that behavior: "wake up
after X amount of time, or sooner if awakened by some other thread".
However, I do believe we should wait for an actual use case before
supporting that.

- Josh Triplett




More information about the Xcb mailing list