Help for this page

Select Code to Download


  1. or download this
        async { lock $LockVar; $LockVar = 'Haha'; sleep 3; print "Thread 1
    +: $LockVar\n" };
        async { lock $LockVar; $LockVar = 'Hehe'; sleep 3; print "Thread 2
    +: $LockVar\n" };
    
  2. or download this
    #!perl -w
    use strict;
    ...
            2 finished and unjoined
            0 running and detached