Can someone please help? Is there anything that I have to add/modify? Thanks#!/usr/bin/perl use strict; use warnings; use threads; use threads::shared; print "Starting main program\n"; my @threads; for ( my $count = 1; $count <= 10;$count++) { my $t = threads->new(\&sub1); push(@threads,$t); } foreach (@threads) { $_->join; } print "End of main program\n"; sub sub1 { //do something }
In reply to Concurrent execution of threads by pplshlp
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |