add assert in Thread