https://github.com/labath approved this pull request. Didn't look at the code all too closely but it looks okay to me. I believe my earlier concerns about cancellation races are resolved now. https://github.com/llvm/llvm-project/pull/130169