MCPcopy Create free account
hub / github.com/MaskRay/ccls / withLock

Method withLock

src/sema_manager.hh:163–166  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

161 T result;
162
163 template <typename Fn> void withLock(Fn &&fn) {
164 std::lock_guard lock(mutex);
165 fn();
166 }
167 bool isCacheValid(const std::string &path, const std::string &line, Position position) {
168 std::lock_guard lock(mutex);
169 return this->position == position && this->path == path &&

Callers

nothing calls this directly

Calls

no outgoing calls

Tested by

no test coverage detected