diff options
Diffstat (limited to 'src/plugins/python/pythonutils.cpp')
-rw-r--r-- | src/plugins/python/pythonutils.cpp | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/src/plugins/python/pythonutils.cpp b/src/plugins/python/pythonutils.cpp index af1c42b5ab..f679fe2b0f 100644 --- a/src/plugins/python/pythonutils.cpp +++ b/src/plugins/python/pythonutils.cpp @@ -98,6 +98,8 @@ static QString pythonName(const FilePath &pythonPath) FilePath getPylsModulePath(CommandLine pylsCommand) { + static QMutex mutex; // protect the access to the cache + QMutexLocker locker(&mutex); static QMap<FilePath, FilePath> cache; const FilePath &modulePath = cache.value(pylsCommand.executable()); if (!modulePath.isEmpty()) |