Details
Details
- Reviewers
ilya-biryukov - Commits
- rGe58e0903e200: [clangd] Avoid emitting Queued status when we are able to acquire the Barrier.
rCTE349032: [clangd] Avoid emitting Queued status when we are able to acquire the Barrier.
rL349032: [clangd] Avoid emitting Queued status when we are able to acquire the Barrier.
Diff Detail
Diff Detail
- Repository
- rL LLVM
Event Timeline
clangd/TUScheduler.cpp | ||
---|---|---|
644 ↗ | (On Diff #176942) | Maybe simplify the code a bit? // Replacing these two lines: // emitTUStatus({TUAction::Queued, Req.Name}); // std::lock_guard<Semaphore> BarrierLock(Barrier); // With: std::unique_lock<Semaphore> BarrierLock(Barrier, std::try_to_lock); if (!Lock.owns_lock()) { emitTUStatus({TUAction::Queued, Req.Name}); Lock.lock(); } // Rest of the code is the same... Avoids creating two locks and does not require helper lamdbas. |