limit the scope of m_stateMutex
2 files changed