Sending messages in a thread