Use a thread safe queue for events.