Make EventManager thread safe