Implemented thread safe event publishing