This is a live mirror of the Perl 5 development currently hosted at https://github.com/perl/perl5
Initial check-in of Thread module.
[perl5.git] / create.t
CommitLineData
d9bb3666
MB
1use Thread;
2sub start_here {
3 my $i;
4 print "In start_here with args: @_\n";
5 for ($i = 1; $i <= 5; $i++) {
6 print "start_here: $i\n";
7 sleep 1;
8 }
9}
10
11print "Starting new thread now\n";
12$t = new Thread \&start_here, qw(foo bar baz);
13print "Started thread $t\n";
14for ($count = 1; $count <= 5; $count++) {
15 print "main: $count\n";
16 sleep 1;
17}