Re: fork, parallel and global values

2010-05-15 Thread raphael()
On Fri, May 14, 2010 at 3:07 PM, Dr.Ruud rvtol+use...@isolution.nlrvtol%2buse...@isolution.nl wrote: raphael() wrote: I want to do work on all elements of an array simultaneously. What kind of data/reality does your array represent? I tried Parallel::ForkManager. It works well when

Re: fork, parallel and global values

2010-05-14 Thread Dr.Ruud
raphael() wrote: I want to do work on all elements of an array simultaneously. What kind of data/reality does your array represent? I tried Parallel::ForkManager. It works well when you don't need to update global value like downloading multiple files at the same time. I want something

Re: fork, parallel and global values

2010-05-13 Thread raphael()
On Tue, May 11, 2010 at 1:23 AM, C.DeRykus dery...@gmail.com wrote: On May 10, 7:07 am, raphael.j...@gmail.com (raphael()) wrote: Hello, -- CODE -- #!/usr/bin/env perl use strict; use warnings; use Parallel::ForkManager; # Parallel::ForkManager my $pfm =

Re: fork, parallel and global values

2010-05-11 Thread raphael()
On Tue, May 11, 2010 at 1:59 AM, Eric Veith1 eric.ve...@de.ibm.com wrote: raphael() raphael.j...@gmail.com wrote on 05/10/2010 04:07:58 PM: I want to do work on all elements of an array simultaneously. To clarify: You want to access an hash defined in the parent process from all N child

Re: fork, parallel and global values

2010-05-11 Thread C.DeRykus
On May 10, 7:07 am, raphael.j...@gmail.com (raphael()) wrote: Hello, -- CODE -- #!/usr/bin/env perl use strict; use warnings; use Parallel::ForkManager; # Parallel::ForkManager my $pfm = Parallel::ForkManager-new(5); my %hash; for my $num ( qw/ 1 2 3 4 5 1 / ) {    

fork, parallel and global values

2010-05-10 Thread raphael()
Hello, -- CODE -- #!/usr/bin/env perl use strict; use warnings; use Parallel::ForkManager; # Parallel::ForkManager my $pfm = Parallel::ForkManager-new(5); my %hash; for my $num ( qw/ 1 2 3 4 5 1 / ) { $pfm-start and next; $hash{$num}++; $pfm-finish; }

Re: fork, parallel and global values

2010-05-10 Thread Eric Veith1
raphael() raphael.j...@gmail.com wrote on 05/10/2010 04:07:58 PM: I want to do work on all elements of an array simultaneously. To clarify: You want to access an hash defined in the parent process from all N child processes? I'm sorry to tell you, but this won't work so easily. When forking,