
FishMonger
Veteran
Aug 29, 2012, 2:29 PM
Views: 4036
|
|
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)
|