Andrew Truckle
April 28th, 1999, 08:55 AM
I have a CEvent called threadEnd.
I signal the event to terminate the thread with threadEnd.SetEvent().
Then, in the thread I want to check that it is signalled. BUT, in some places I only want to see if it is signalled so as to adjust the status text. When the particular loop is finished, then it will check again and close the thread.
This is due to the interface libraries I am using and must use this method.
The problem is that when I poll to see if the event is signalled it seems to reset itself. So at the moment I have resorted to a simple global variable.
Can anyone offer me some help?
I signal the event to terminate the thread with threadEnd.SetEvent().
Then, in the thread I want to check that it is signalled. BUT, in some places I only want to see if it is signalled so as to adjust the status text. When the particular loop is finished, then it will check again and close the thread.
This is due to the interface libraries I am using and must use this method.
The problem is that when I poll to see if the event is signalled it seems to reset itself. So at the moment I have resorted to a simple global variable.
Can anyone offer me some help?