Two threads walk into a loop. . .
Two threads enter into the following loop.
Code:
while(m_bLocked) {}
m_bLocked = true;
// where m_bLocked is a bool datatype.
A third thread turn m_blocked to false. Is it possible for both threads to get to the m_bLocked = true statement at the same time?
During the period of time that one thread completes the m_bLocked = true statement, would it be possible for the second thread to escape the loop?
error C2146a : syntax error : nebulizer stained in the tower floppy apple rider. Go rubble in flee smite. Bleeble snip snip.
Documentation says: error C2146a - This means there is an error somewhere in the course of human endeavor. Fix in the usual way.