HANDLE hBusConn=(HANDLE) _beginthreadex (NULL, 0, m_BusConnThread, this, 0, NULL);
To implement different process pipe connection between operations,
But when the test found that sometimes this function will not return, thread function m_BusConnThread nor is up and running,
Static is the content of the m_BusConnThread unsigned int __stdcall m_BusConnThread (void * pPM) {return (pPM) (CBusPort *) - & gt; M_BusConn (); }
It is a class member function of another function called implementation of specific functions,
When I was in the loop test, the program function is normal, but ran ran could HANDLE hBusConn=(HANDLE) _beginthreadex (NULL, 0, m_BusConnThread, this, 0, NULL); It does not return,
I checked on the MSDN also did not mention any information on this function will be stuck,
Everyone who has also encountered similar problems, can help analyze the reason,
CodePudding user response:
Code stick up to look at it, the content of not less than ten wordsCodePudding user response:
Should be related to piping, the code is not enough, not enough to analysisCodePudding user response:
Multi-threading does not block, you see if you what inside threadCodePudding user response:
Test and operation, and then point interruption, see if parked in whereCodePudding user response:
Thread interlock,CodePudding user response:
"Windows core programming"