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

Martin v. Loewis martin at v.loewis.de
Tue Aug 6 05:10:16 EDT 2002


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

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

Regards,
Martin



More information about the Python-list mailing list