tsan: add support for idle threads