in reply to Re: Threading Equivalent to this Parallel::ForkManager Example
in thread Threading Equivalent to this Parallel::ForkManager Example
This would seem to be an equivalent:
Not so. It is fatally flawed.
Your code is directly equivalent to:
#!/usr/bin/env perl use strict; use warnings; use threads; my $n = 0; while (<DATA>) { print 'Thread ', ++$n, ': ', $_; }
Ie. It exhibits no parallelism whatsoever.
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re^3: Threading Equivalent to this Parallel::ForkManager Example
by kcott (Archbishop) on Apr 02, 2014 at 08:13 UTC |