I agree they should destroy themselves and clean up after them after they are done... This is frustrating. If I had known this I would have started this project with JAVA... Threads are so easy to do in JAVA. You give them a list of instructions; they do their jobs asynchronously or synchronously, and clean up after themselves...
The only thing I know to do is at this point is break off pieces of my service and create an executable and let the loop do an exec on that executable. The problem is I don't know how to keep track of what executable has access to what modem... I only have 6 modems but an unknown number of jobs in queue... This sounds messy; and I don't like doing things like this messy. I will try the ithreads group to see if those guys have any suggestions. I tried the Thread::Pool module but it has issues with undefined subroutines in it... -----Original Message----- From: $Bill Luebkert [mailto:[EMAIL PROTECTED] Sent: Friday, April 14, 2006 9:36 AM To: Daniel Rychlik Cc: activeperl@listserv.ActiveState.com Subject: Re: Threads? Daniel Rychlik wrote: > I just found out that threads are indeed expensive... Even if my loop > sleeps for 2 minutes thread count continues to increment... How do you > destroy a thread when you know that its job is done? Let me preface by saying I don't use threads, but you would think that when you reach the end of the thread's code that it would be destroyed. You may have to wait on it in the main thread, but I don't know that for certain. You could join the list for more help: perl-ithreads@perl.org _______________________________________________ ActivePerl mailing list ActivePerl@listserv.ActiveState.com To unsubscribe: http://listserv.ActiveState.com/mailman/mysubs