david2008 has asked for the wisdom of the Perl Monks concerning the following question:
I have the following question.
I have a computation which i want to make in parallel.
For this purpose i want to fork a couple of childs and make with them the computation.
The result of each child is an object which i want to return the parent.
The parent will then combine the computation.
My question is how do i return an object from the child to the parent.
In the documentation it is written:
"Each child process may optionally send 1 data structure back to the parent. By data structure, we mean a reference to a string, hash or array. The contents of the data structure are written out to temporary files on disc using the Storable modules' store() method."
So i don't see a way to pass an object back.
On the other hand, in perl all the objects are plain data structures which are blessed.
So can't i just retrieve the structure and bless it with the package name ?
Is there something problematic with this?
David
|
---|
Replies are listed 'Best First'. | |
---|---|
Re: Parallel::ForkManager pass object from child to parent
by moritz (Cardinal) on Feb 05, 2013 at 09:45 UTC | |
Re: Parallel::ForkManager pass object from child to parent
by sundialsvc4 (Abbot) on Feb 05, 2013 at 14:04 UTC | |
Re: Parallel::ForkManager pass object from child to parent
by Anonymous Monk on Feb 05, 2013 at 09:49 UTC |