bug-hurd
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: race condition destroying condition variables


From: Samuel Thibault
Subject: Re: race condition destroying condition variables
Date: Tue, 19 Dec 2017 09:25:16 +0100
User-agent: NeoMutt/20170113 (1.7.2)

Brent W. Baccala, on mar. 19 déc. 2017 00:08:44 -0500, wrote:
> Looks like there's a race condition when we destroy a condition variable.  My
> understanding of the expected behavior is that once all the threads have been
> signaled (i.e, pthread_cond_broadcast is called), the condition variable can 
> be
> safely destroyed with pthread_cond_destroy.

Err, I don't think that POSIX allows to assume that. The fact that
pthread_cond_broadcast has returned doesn't mean that other threads have
finished with pthread_cond_wait.

Samuel



reply via email to

[Prev in Thread] Current Thread [Next in Thread]