Your skill will accomplish what the force of many cannot |
|
PerlMonks |
Re^3: Standard way to convert timezone in multithreaded scriptby rowdog (Curate) |
on Nov 24, 2009 at 18:09 UTC ( [id://809157]=note: print w/replies, xml ) | Need Help?? |
perl -Mthreads -e'$n=3;for (1..$n){$t[$_]=threads->create(sub{my $r; while(1){$r++}});}; sleep 10;threads->exit()' FWIW, I can attest that setting n=2 pegs both cores on my amd 3800+ running Arch Linux. However, n=1 (recommended setting) only pegs one core.
In Section
Seekers of Perl Wisdom
|
|