Dear Monk BrowserUk! Please take a bow!!

Thank You so much - for enlightening me :) Indeed - it was my lack of understanding.

I have found this entire discussion from everybody - very helpful.

-=-=-=-=-=-=-=-

Now, I need more :) It seems - me and my code is tired of doing so many .. if exists.. else share.. kinda additives before I do any structure change - and I think no way to avoid that. Now a couple of Questions here:

Q1. Is there any easier method?

Q2. Is it possible to grow a local tree or branch data-structure, then create a shared_clone - and graft the new tree to s sub-branch of main shared tree?

Q3. I have few subroutines to be called many times - based on data - from inside my thread_worker. So far I am lacking depth in understanding or visualizing - how/when multiple threads work on different set of data, while calling a subroutine - does the code-inside-subroutine-block gets a replicated inside the thread uniquely? - else how the sanity is retained? - sorry if I am asking too basic question - maybe it is the case, I am confused - and not clear enough - where is my confusion too..

Q4. Inside subroutine - do I have to use every variable as local and not-shared?

Thanks a lot! Again & Again!


In reply to Re^4: Is it possible to create a single Hash-of-Hash.. with multiple threads.. by gsat
in thread Is it possible to create a single Hash-of-Hash.. with multiple threads.. by gsat

Title:
Use:  <p> text here (a paragraph) </p>
and:  <code> code here </code>
to format your post, it's "PerlMonks-approved HTML":



  • Posts are HTML formatted. Put <p> </p> tags around your paragraphs. Put <code> </code> tags around your code and data!
  • Titles consisting of a single word are discouraged, and in most cases are disallowed outright.
  • Read Where should I post X? if you're not absolutely sure you're posting in the right place.
  • Please read these before you post! —
  • Posts may use any of the Perl Monks Approved HTML tags:
    a, abbr, b, big, blockquote, br, caption, center, col, colgroup, dd, del, details, div, dl, dt, em, font, h1, h2, h3, h4, h5, h6, hr, i, ins, li, ol, p, pre, readmore, small, span, spoiler, strike, strong, sub, summary, sup, table, tbody, td, tfoot, th, thead, tr, tt, u, ul, wbr
  • You may need to use entities for some characters, as follows. (Exception: Within code tags, you can put the characters literally.)
            For:     Use:
    & &amp;
    < &lt;
    > &gt;
    [ &#91;
    ] &#93;
  • Link using PerlMonks shortcuts! What shortcuts can I use for linking?
  • See Writeup Formatting Tips and other pages linked from there for more info.