develooper Front page | perl.ithreads | Postings from November 2011

timing out threads

Thread Previous | Thread Next
November 1, 2011 23:27
timing out threads
Message ID:
Hi Thread GURU,
	I would like to perform the following, start X (say 10) number
of threads to perform some operation (ex. Copy command), I would like to
exit or return out of the thread(s) that takes too long ( ex. 30 minutes
). I'm thinking I should spawn an independent thread (a watch thread)
and have that thread watch to see if any of the 10 threads are taking
longer than 30 minutes to complete. Any example how I can accomplish
this? Any other suggesting would be great to. 

BTW, I'm using perl 5.8.8., thread version 1.07.


Thread Previous | Thread Next Perl Programming lists via nntp and http.
Comments to Ask Bjørn Hansen at | Group listing | About