This function is called from inside of the poll thread.

It sends out any messages which were enqueued by other threads.