gsat has asked for the wisdom of the Perl Monks concerning the following question:
I have to create & populate a new large hohoh hash-of-hash structure, cooked out of another input hoh structure, which I am reading from a file by Storable retrieve functionality.
I am using Thread::Queue
The problem I am facing ::
Issue.1 : I thought with shared_clone I can create a deep copy of entire hoh - Using threads [Version 1.92] & threads::shared [Version 1.46].
my $indb = retrieve('input_hash.perl.db'); my $copydb = shared_clone( $indb ); .. .. my $thr1 = threads->new(\&thrd_run, $copydb); ..
not working
==========
For the time being as input db is not too large - I am repeatedly retrieving from inside every thread-run [ sub thrd_run ] - i don't like this - I want to retrieve the db only once - and want to reuse / use cloned copy / shared copy of the same and pass it to every thread. Is is possible?
Issue.2 : I wish to create another hohoh [a tree - with approx leaf node numbers > 60M - after few different depth of branched-hierarchies ] - I wish to populate this hohoh structure from inside my thread runs - shared write into a hohoh ref.. is that possible?
Even if no, what would be a good alternative plans.
Thanks a bunch in advance..
Any light will help in the dark..
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re: Is it possible to create a single Hash-of-Hash.. with multiple threads..
by kcott (Archbishop) on Mar 14, 2014 at 00:17 UTC | |
by gsat (Initiate) on Apr 25, 2014 at 01:17 UTC | |
by BrowserUk (Patriarch) on Apr 25, 2014 at 10:21 UTC | |
by gsat (Initiate) on May 02, 2014 at 16:18 UTC | |
by BrowserUk (Patriarch) on May 03, 2014 at 07:46 UTC | |
|
Re: Is it possible to create a single Hash-of-Hash.. with multiple threads..
by zentara (Cardinal) on Mar 14, 2014 at 10:54 UTC | |
|
Re: Is it possible to create a single Hash-of-Hash.. with multiple threads..
by oiskuu (Hermit) on Mar 14, 2014 at 14:36 UTC |