File tree Expand file tree Collapse file tree 1 file changed +6
-2
lines changed Expand file tree Collapse file tree 1 file changed +6
-2
lines changed Original file line number Diff line number Diff line change 3
3
use re ' eval' ;
4
4
use threads;
5
5
use threads::shared;
6
- use Clone ' clone' ;
6
+ # use Clone 'clone';
7
7
8
8
my @threads ;
9
9
my $donework :shared;
@@ -578,11 +578,12 @@ sub getidtostor {
578
578
# CORE::print ("$ident " . Dumper2(\@{$identstoidmap->{$ident}}) . "\n");
579
579
580
580
foreach my $id (@{$identstoidmap -> {$ident }}) {
581
- CORE::print ($id -> [0] . " against " . $currpos . " \n " );
581
+ # CORE::print ($id->[0] . " against " . $currpos . "\n");
582
582
last if ($id -> [0] > $currpos );
583
583
$lastid ++;
584
584
}
585
585
}
586
+ # CORE::print ("lastid $lastid\n");
586
587
return $lastid ;
587
588
}
588
589
@@ -597,6 +598,8 @@ sub broadcastid {
597
598
598
599
CORE::print (" signalling over " . $idtosignal . " \n " );
599
600
601
+ lock @{$identstoidmap -> {$ident }-> [$idtosignal ]};
602
+
600
603
$identstoidmap -> {$ident }-> [$idtosignal ]-> [1] = 1;
601
604
602
605
cond_broadcast(@{$identstoidmap -> {$ident }})
@@ -633,6 +636,7 @@ sub waitforid {
633
636
# CORE::print("$currpos waitin : " . Dumper2(\@{$identstoidmap->{$ident}}));
634
637
635
638
foreach my $ind (@{$identstoidmap -> {$ident }}) {
639
+ lock @{$ind };
636
640
# CORE::print ("check map $ind \n");
637
641
last if (not ($ind -> [0] <= $currpos ));
638
642
$areallset = $areallset && $ind -> [1];
You can’t perform that action at this time.
0 commit comments