in reply to Re^5: Use more threads.
in thread Use more threads.
This starts 100 threads in < 1/2 a second:
#! perl -slw use strict; use Time::HiRes qw[ time ]; use threads stack_size => 4096; my $start = time; async { #printf "%u starting\n", threads->tid; sleep 1e3 } ->detach for 1 .. 100; printf "Took %f seconds\n", time() - $start; __END__ C:\test>junk Took 0.445518 seconds
Those are do nothing threads, but still, you must be doing something weird. Post your code.
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re^7: Use more threads.
by password (Beadle) on Apr 30, 2013 at 11:00 UTC | |
by BrowserUk (Patriarch) on Apr 30, 2013 at 11:27 UTC |