While (m_thread_flag)
{
If (m_prama_ok)
{... }
}
In the class destructor m_thread_flag set to false, sometimes m_prama_ok has been destruction caused by collapse, also is the class have already begun the destructor, but the thread is running, in the calling class private variables also cause errors, could you tell me how to deal with this problem, I need to open a thread, need to use class variables)?
CodePudding user response:
The WaitForSingleObject or WaitForMultipleObjectsAfter the thread is to destroy the object
CodePudding user response:
"Windows core programming"