Skip to content
Snippets Groups Projects
Commit d489efd5 authored by Adrien Béraud's avatar Adrien Béraud
Browse files

fileutils: protect fileLock access with mutex

Change-Id: I03397f2a9c558b2969f4ce1d177b4905aff6b584
parent ca96c74c
Branches
No related tags found
No related merge requests found
......@@ -218,10 +218,12 @@ expand_path(const std::string &path)
}
std::map<std::string, std::mutex> fileLocks {};
std::mutex fileLockLock {};
std::mutex&
getFileLock(const std::string& path)
{
std::lock_guard<std::mutex> l(fileLockLock);
return fileLocks[path];
}
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment