The old way to manage thread will cause dead loop. Try the new way.