try to set thread asleep when set is finished