timeout execution of a command

inter

Freshman
Joined
Jul 22, 2005
Messages
36
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,
 
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.
 
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

Cags said:
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.
 
Last edited:
Back
Top