I did forget one thing. One the m_PendingJobs map becomes empty I have to make sure to empty the m_JobKeys deque
The proper code at the completion of a job is
PHP Code:
if (wParam != m_PendingJobs.size() - 1)
m_JobKeys.push_back(wParam);
m_PendingJobs.erase(m_PendingJobs.find(wParam));
if (m_PendingJobs.empty())
m_JobKeys.clear();
Wakeup in the morning and kick the day in the teeth!! Or something like that.
"i don't want to write leak free code or most efficient code, like others traditional (so called expert) coders do."