inter Posted February 23, 2006 Posted February 23, 2006 Hello, I have a for loop. in this for loop I try to perform a command(send1fax). this send1fax command sometimes doesn't work and keeps on trying to send. I would like to have some sort of a time out.... if send1fax hasn't finished in 30 seconds... then go to the next in my for loop. for blabla to allfaxes send1fax("555 55555") next I can NOT change the code in the send1fax function. I can only programme around it. can anyone help ? thx, Quote
Cags Posted February 23, 2006 Posted February 23, 2006 Perhaps if you could call this method on a seperate thread you could terminate the thread after 30 seconds if its still open. Just an idea, it might not work, but there again it might inspire an idea from somebody else. Quote Anybody looking for a graduate programmer (Midlands, England)?
inter Posted February 24, 2006 Author Posted February 24, 2006 (edited) I thought of doing something like this aswell... but don't know how to terminate a thread. do you ? edit: ok... I found a link: http://www.codeproject.com/vb/net/ThreadDeath.asp I'm going to check it thx for the tip Perhaps if you could call this method on a seperate thread you could terminate the thread after 30 seconds if its still open. Just an idea' date=' it might not work, but there again it might inspire an idea from somebody else.[/quote'] Edited February 24, 2006 by inter Quote
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.