Help for this page

Select Code to Download


  1. or download this
    sub safe_set {
       my $k = shift;
    ...
       lock $$h{ $k };
       $h{$k} = \$v;
    }
    
  2. or download this
    
    TIMESTEP 0:
    ...
        Thread T1: Acquires Lock on v1, proceeds
        <Race-around condition>
    
  3. or download this
    #! perl -slw
    
    ...
    $_->join for @pool;
    
    warn ${$h{$k}}, "failed\n" if ${$h{$k}} != $THREADS * $iter;