iThreads troubles

[email protected] ("Daniel Rychlik")
Newsgroups perl.ithreads
Message-ID <60EF0688716ED54E87435A187FB6BD6A0183056B@IS-MAILX.corp.securustech.net>
Good morning,

 

I am having troubles with threads within my PERL service which was built
to monitor a queue for jobs to do.  The issue I am running into is, I
have an unknown number of jobs to do but can only do 6 at one time.  The
reason that I can only do 6 at one time is because I only have 6
resources available to me for each job.  

 

I looked into using threads to do the jobs asynchronously, as a file
comes into a queue; a loop monitors this queue and then creates a new
thread to carry out that job.  I have this piece of the code complete,
the problem is after the job is complete and a list of instructions is
complete, the thread doesn't clean up after itself.  My thread count
continues to increment as well as memory space.  The loop that I use to
monitor the queue is a while true loop and it sleeps for 2 minutes
waiting for more files to process and upload.  

 

I need help on how to clean up after a thread to release its resource.
I have researched this for 2 days now and Im growing weary.  It was
suggested to me to subscribe to this list to find out more information.


 

I greatly appreciate this in advance,

Dan J. Rychlik
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.