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
- rCTE Clang Tools Extra
- Build Status
Buildable 25833 Build 25832: arc lint + arc unit
Event Timeline
clangd/TUScheduler.cpp | ||
---|---|---|
652 | 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. |
Maybe simplify the code a bit?
Avoids creating two locks and does not require helper lamdbas.