yingcong-wu wrote: I just think that since it is a recursive_mutex, we just need to lock it whenever we use it to avoid the mental burden of remembering to lock it in the public interface. https://github.com/llvm/llvm-project/pull/112667