Copying ithreads group as well.

 

________________________________

From: Daniel Rychlik 
Sent: Thursday, May 04, 2006 5:33 PM
To: [email protected]
Subject: Intresting Logic Problem

 

Oh great an powerful PERL Oz

 

I have just discovered a serious issue within the core architecture of
this beast of a program that I have written using threads...  

 

I am using Thread::Queue to throttle resources from the jobs that have
to be done at any given time.  

 

This program, collects information from a database, maps a drive using
OLE calls, and copies the files to the destination drive and it does
this part well.  The problem is, some of my servers are dial up...  I
have no issues making modem calls but sometimes I get disconnected
during the copy phase which causes my threads to hold up and not release
its resource back to the queue for the next job...  

 

I am limited on resources for the jobs...  

 

Right now, I am simply passing the job off to a thread and detaching
it...  If for some reason, like being disconnected from the server, the
thread hangs out there in lala land and never returns it resource back
to the resource queue for the next job, causing a major bottleneck in my
program.  

 

I am inquiring about a possible solution to monitor either connection
status to my destination server, or a thread timeout so that I can catch
the resource and put it back in the queue for the next job.  

 

Any suggestions would be wonderful and I would owe you money for this
one...  

 

Dan

Reply via email to