CGI/Perl Guide | Learning Center | Forums | Advertise | Login
Site Search: in

  Main Index MAIN
Search Posts SEARCH
Who's Online WHO'S
Log in LOG

Home: Perl Programming Help: Intermediate: Re: [Sam Kennedy] Thread or Fork?: Edit Log

Veteran / Moderator

Aug 29, 2012, 2:29 PM

Views: 23627
Re: [Sam Kennedy] Thread or Fork?

it hasn't worked

That's a very poor problem statement.

In what way does it not work?

What does it do that you didn't expect and how does that differ from what you expected?

What thread module(s) are you using?


${"thr".$i} = new Thread \&pixel_comparison, $i;

Ouch! Why are you using a symbolic reference?

Doing that tells me that you're not using the strict pragma, which is a mistake. Instead of the symbolic reference, you should be using a hash or an array.

Also, it's best to not use the indirect object call. That statement should more like this:

$thread[$i] = Thread->new(\&pixel_comparison, $i);

(This post was edited by FishMonger on Aug 29, 2012, 2:30 PM)

Edit Log:
Post edited by FishMonger (Veteran) on Aug 29, 2012, 2:30 PM

Search for (options) Powered by Gossamer Forum v.1.2.0

Web Applications & Managed Hosting Powered by Gossamer Threads
Visit our Mailing List Archives