Jump to content
Xtreme .Net Talk

Recommended Posts

Posted

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,

Posted
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.
Anybody looking for a graduate programmer (Midlands, England)?
Posted (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 by inter

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...