|Problems? Is your data what you think it is?|
Re^2: Perl detached threads, loops & my?by expresspotato (Beadle)
|on Jun 09, 2010 at 01:56 UTC||Need Help??|
@BrowserUK - I am using the latest version of perl (why would anyone use anything less?)
The only reason I "store them" is to ensure it is a fresh thread everytime. Using my $thr -> will eventually crash.
The script is designed to do one thing. Process the list of tasks and just keep on going. Tasks (detached threads) may take a second and they may take an hour.
I do not claim it takes "Hours to run", I claim it may be "run for hours".
Ah ha! See... Always calling my $thr on occasion seems to overwrite / invalidate the older thread. When checking memory usage using my $thr, it never seems to increase which is very odd to me.
Thanks for the code, however the script is "always running" and does not ever exit.
Perhaps the actual code will shed some light on what is really going on. Its attached below. Keep in mind the same problem still exists. How to ensure this is a FRESH thread (as my or the same $thr will eventually crash), without wasting all that memory.