On Saturday 23 June 2007 15:08, Tom Phoenix wrote:
> On 6/23/07, Michael Scondo <[EMAIL PROTECTED]> wrote:
> > sub thread1{
> > print "1\n";
> > lock $x;
> > print "locked x: 1\n";
> > cond_wait $x;
>
> Can't get past here until $x is
On 6/23/07, Michael Scondo <[EMAIL PROTECTED]> wrote:
sub thread1{
print "1\n";
lock $x;
print "locked x: 1\n";
cond_wait $x;
Can't get past here until $x is signalled by another thread, and
unlocked by all other threads.
Hi,
I'm trying to make myself familiar with threads.
However, I encountered some unexpected behaviour of locks/cond_wait I wasn't
able to figure out.
Could someone explain to me what's happening ??
Thanks, Michael
--
#!/usr/bin/perl -w
use threads;
use threads::shared;
sh