Added recv_messages to threading.