Help for this page

Select Code to Download


  1. or download this
    bash $ (sleep 1; killall -HUP the_parent) & perl threads.pl
    [1] 4842
    Thread 1: Created
    ...
    Thread 1: Shutting down
    Thread 3: Shutting down
    1 still running. Giving up!
    
  2. or download this
    #!/usr/bin/env perl
    
    use 5.012;
    ...
    
    $_->join for @thr;
    say "All threads exited normally.";