terminate and restart thread
terminate and restart thread