test thread state