tsan: detect when a thread ends with ignores enabled