remove useless spawning of a thread that only sleeps