./perl/test/threads/thr1.pl

download original
#!/usr/bin/perl -w

use Thread;

my $t1 = new Thread \&threadf ( 3 ),
   $t2 = new Thread \&threadf ( 1 )

$t1->join;

sub threadf {
    print "thread anfang\n";
    sleep $_[0];
    print "thread ende\n";
}

  
back to threads

(C) 1998-2017 Olaf Klischat <olaf.klischat@gmail.com>