Wiggins has asked for the wisdom of the Perl Monks concerning the following question:
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
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re: Is a called package in thread storage?
by BrowserUk (Patriarch) on Jul 15, 2008 at 18:05 UTC | |
by Wiggins (Hermit) on Jul 15, 2008 at 20:12 UTC | |
by BrowserUk (Patriarch) on Jul 15, 2008 at 22:45 UTC | |
|
Re: Is a called package in thread storage?
by pc88mxer (Vicar) on Jul 15, 2008 at 17:45 UTC | |
|
Re: Is a called package in thread storage?
by renodino (Curate) on Jul 15, 2008 at 21:03 UTC | |
by Wiggins (Hermit) on Jul 16, 2008 at 14:23 UTC |