An simple thread safe pub-sub