Change the thread running flag before send message.