|
-
June 3rd, 1999, 12:12 AM
#1
Refreshing a Thread
I am using multitheading in VC++ 5.0. I created a thread.
ThreadFunction()
{
DTL_READ(int x, 1000);
...
...
}
The DTL_READ function is supplied by some other vendor. Due to some problem, it is getting hanged at that function. I want to refresh the Thread. I will be able to know when the thread got hanged using another thread.
Can U suggest me the safest method of restarting the thread.
I strucked up in a major problem. Pls help me at the earliest.
Ravi Sangisetti
Sr.Software Engineer
Contech India Ltd
Gandinagar, India
-
June 3rd, 1999, 03:20 PM
#2
Re: Refreshing a Thread
The only thing you can do here is call TerminateThread. (It is listed as a dangerous thing to do). Your other option is to use a second exe and communicate via COM or RegisteredMessages and if it hangs you can terminate the other process and restart. This give the benifit of not doing strange things with your process space.
HTH,
Chris
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|