kadircet created this revision. kadircet added a reviewer: sammccall. Herald added subscribers: cfe-commits, usaxena95, arphaman, jkorous, MaskRay, javed.absar, ilya-biryukov. Herald added a project: clang.
Our tests stash callbacks into request context and rely on it being invoked before threads going idle. Repository: rG LLVM Github Monorepo https://reviews.llvm.org/D77671 Files: clang-tools-extra/clangd/TUScheduler.cpp Index: clang-tools-extra/clangd/TUScheduler.cpp =================================================================== --- clang-tools-extra/clangd/TUScheduler.cpp +++ clang-tools-extra/clangd/TUScheduler.cpp @@ -255,9 +255,11 @@ NextReq.reset(); } - WithContext Guard(std::move(CurrentReq->Ctx)); - // Build the preamble and let the waiters know about it. - build(std::move(*CurrentReq)); + { + WithContext Guard(std::move(CurrentReq->Ctx)); + // Build the preamble and let the waiters know about it. + build(std::move(*CurrentReq)); + } bool IsEmpty = false; { std::lock_guard<std::mutex> Lock(Mutex);
Index: clang-tools-extra/clangd/TUScheduler.cpp =================================================================== --- clang-tools-extra/clangd/TUScheduler.cpp +++ clang-tools-extra/clangd/TUScheduler.cpp @@ -255,9 +255,11 @@ NextReq.reset(); } - WithContext Guard(std::move(CurrentReq->Ctx)); - // Build the preamble and let the waiters know about it. - build(std::move(*CurrentReq)); + { + WithContext Guard(std::move(CurrentReq->Ctx)); + // Build the preamble and let the waiters know about it. + build(std::move(*CurrentReq)); + } bool IsEmpty = false; { std::lock_guard<std::mutex> Lock(Mutex);
_______________________________________________ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits