develooper Front page | perl.perl5.porters | Postings from November 1999

Re: perlthread.pod, take two

Thread Previous | Thread Next
From:
Hans Mulder
Date:
November 6, 1999 14:36
Subject:
Re: perlthread.pod, take two
Message ID:
199911062235.AA00924@xs4all.nl
Hello,

In article <3.0.6.32.19991029132524.00c1c830@tuatha.sidhe.org>, you wrote:

>for example,
>
>    {
>        lock $foo;
>	cond_wait $foo unless $foo;
>    }

Shouldn't this, in general be

    {
        lock $foo;
	cond_wait $foo until $foo;
    }

?

We can assume that $foo is true when it is signalled, but that
does not necessarily mean it is still true when the receiving
thread reacquires the lock.

-- HansM

Thread Previous | Thread Next


nntp.perl.org: Perl Programming lists via nntp and http.
Comments to Ask Bjørn Hansen at ask@perl.org | Group listing | About