Another project, another quandary. This one takes me back to 1971, undergraduate CS. "Recursion - Re-entrant, Reusable, Refreshable".

thread 1; runs File::Monitor discovering and enqueueing filenames to
thread 2; Thread::Queue feeding
thread 3-6; my code to do MIME Email decomposition. All feeding off of the QUEUE.

I have put the MIME decomp code(developed earlier) into a simple non-OO package, simply for scoping and to modularize the files. If I leave this MIME code in that package; and call it from threads 3,4,5,6; are its local (my) variables in global storage or thread storage? If I cut/paste the MIME code into the processing subroutine running on those threads(3-6), it is definitely in thread-specific storage.

I probably need to pass the MIME decomp an array reference to push it's results into anyway.

I am that finding that looking for answers on the web for topics like this (Perl Threads) can be dangerous, since many go back to 5.003 or other implementations.

Any suggestions on books on current Perl threading would be much appreciated...

Thanks


In reply to Is a called package in thread storage? by Wiggins

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.