I guess the assumption is that using std::atomic<bool> m_isAlive;
turns the following into a critical section:
void EReader::readToQueue() {
//EMessage *msg = 0;
while (m_isAlive) {
if (m_buf.size() == 0 && !processNonBlockingSelect() && m_pClientSocket->isSocketOK())
continue;
if (!putMessageToQueue())
break;
}
But it does not, so I take your point.