F
Flashster
I've a form application that, as one of its functions, gets some data from a
web site.
I wanted to run the process on a thread so that the application doesn't get
tied up whilst the web process is running. However, I want to be able to
time out the thread if its 'completed' event isn't triggered within a set
amount of time.
What the best way to timeout an event? I've tried starting another 'timer'
thread that aborts the web thread when its reaches its timeout value, but it
seems that I must have done it wrong as the whole application slows down,
as it did when I didn't use any threads(!)
I understand that the thread.Join command stops pauses the application until
the thread finishes, so that won't help me.
web site.
I wanted to run the process on a thread so that the application doesn't get
tied up whilst the web process is running. However, I want to be able to
time out the thread if its 'completed' event isn't triggered within a set
amount of time.
What the best way to timeout an event? I've tried starting another 'timer'
thread that aborts the web thread when its reaches its timeout value, but it
seems that I must have done it wrong as the whole application slows down,
as it did when I didn't use any threads(!)
I understand that the thread.Join command stops pauses the application until
the thread finishes, so that won't help me.