Message-ID: <
20020509171842.C9836@fdgroup.com>
p4raw-id: //depot/perl@16529
sub foo {
lock($lock);
print "ok 1\n";
- sleep 2;
- print "ok 2\n";
+ my $tr2 = threads->create(\&bar);
cond_wait($lock);
+ $tr2->join();
print "ok 5\n";
}
sub bar {
+ print "ok 2\n";
lock($lock);
print "ok 3\n";
cond_signal($lock);
}
my $tr = threads->create(\&foo);
-my $tr2 = threads->create(\&bar);
$tr->join();
-$tr2->join();