Re: fork, parallel and global values

2010-05-15 Thread raphael()
On Fri, May 14, 2010 at 3:07 PM, Dr.Ruud > 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 you don't need to update >> global value l

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 like

Re: fork, parallel and global values

2010-05-13 Thread raphael()
On Tue, May 11, 2010 at 1:23 AM, C.DeRykus 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

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

Re: fork, parallel and global values

2010-05-10 Thread raphael()
On Tue, May 11, 2010 at 1:59 AM, Eric Veith1 wrote: > "raphael()" 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, b

Re: fork, parallel and global values

2010-05-10 Thread Eric Veith1
"raphael()" 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, data is *copied*. Whic