Clean up the code and use atomic for m_curCollection, m_evtCount and m_firedIncident to make it thread-safe. Ping @gemmeren for further check.