Help for this page

Select Code to Download


  1. or download this
    my $lock : shared;
    {
    lock($lock)
    ...do something that only 1 thread at a time should do...
    }
    
  2. or download this
    use threads;
    use threads::shared;
    ...
            sleep 3;
        }
    }