Thank you for your answer.
"I'm not sure why you've posted the fork code if your question is about threads? But...."
I had thought every fork was a thread.... And a call to fork() started a child process and returned the PID of that process.
I had heard fork() leakes like a sieve even in 12. so a threads version would be very helpful. However I am not proficient enough to follow your code completely.
download#! perl -slw use strict; use threads; my @threads = map async( sub{ my( $num, $sleep ) = @_; print "started HTTP CALL"; print "done with HTTP CALL return results";return $num; }, print "Done with 10 HTTP CALLS RETURN RESULTS", $_->join for @threads; # I am assuming @threads now holds the 10 results for each child proce +ss. Correct?
In reply to Re^2: Perl Threads Question.
by Monkomatic
in thread Perl Threads Question.
by Monkomatic
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |