Hi

I have a worker-thread that send a callback WM_APP-message to the parent when finished.

(.... workerthread end...)
::SendMessage(hParent, WM_APP+101, NULL, NULL);
return 0;
}

In the parents messageloop we handle data from worker thread and want to create a new worker thread todo next job:

(.... messageloop in mainprogram ....)
if{message == WM_APP+101)
{
DWORD dwCode;
m_thread.Stop(dwCode); //Deadlock since CThread syncronize?
}

I'm currently using the CThread wrapper: http://www.codeproject.com/KB/threads/cthread.aspx

There much be a common practice to manage such scenario. What would you do, with or withour the CThread implementation?