fixed include in communication example
made access of messages list threadsafe