Python threading (was: Re: global interpreter lock not working as it should)

Armin Steinhoff a-steinhoff at web.de
Tue Aug 6 16:17:11 EDT 2002


martin at v.loewis.de (Martin v. Loewis) wrote in message news:<m3n0s073pj.fsf at mira.informatik.hu-berlin.de>...
> a-steinhoff at web.de (Armin Steinhoff) writes:
> 
> > > No, this isn't to guard against broken pthread_cond_wait
> > > implementations.  The POSIX spec for pthread_cond_signal allows
> > > that any number of threads may be signaled;
> > 
> > No ... only the first thread in the waiting queue get the state
> > 'runnable'!
> 
> Read the spec:
> 
> http://www.opengroup.org/onlinepubs/007904975/functions/pthread_cond_wait.html

Wrong spec ... we are talking about pthread_cond_signal! 

> " Spurious wakeups from the pthread_cond_timedwait() or
> pthread_cond_wait() functions may occur."

Happens only during special signal conditions.

Armin 

> 
> Regards,
> Martin



More information about the Python-list mailing list