MCPcopy Create free account
hub / github.com/Kitware/CMake / AcquireLock

Method AcquireLock

Source/cmInstrumentation.cxx:887–895  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

885}
886
887bool cmInstrumentation::AcquireLock(std::string const& lock_file,
888 cmFileLock& lock, unsigned long timeout)
889{
890 std::string const lock_path = cmStrCat(this->timingDirv1, '/', lock_file);
891 if (!cmSystemTools::FileExists(lock_path)) {
892 cmSystemTools::Touch(lock_path, true);
893 }
894 return lock.Lock(lock_path, timeout).IsOk();
895}
896
897/*
898 * Always called by ctest --wait-and-collect-instrumentation in a detached

Callers 2

LockBuildDaemonMethod · 0.95
LockIndexingMethod · 0.95

Calls 4

IsOkMethod · 0.80
cmStrCatFunction · 0.70
FileExistsFunction · 0.50
LockMethod · 0.45

Tested by

no test coverage detected