summaryrefslogtreecommitdiffstats
path: root/src/corelib/io/qfileinfo.cpp
diff options
context:
space:
mode:
authorMate Barany <mate.barany@qt.io>2023-01-11 17:55:16 +0100
committerMate Barany <mate.barany@qt.io>2023-01-12 12:24:36 +0100
commit696ad54e5d76dd063cbb02d0c288fdece6ee75d0 (patch)
tree834754d8ce458dc6113db20a313eabec3fcba938 /src/corelib/io/qfileinfo.cpp
parent1c62e821bab505730d4f8bb88a3404fb789a5359 (diff)
[doc] Warn users about data races regarding qt_ntfs_permission_lookup
qt_ntfs_permission_lookup is a non-atomic global variable that is prone to data races. Make a remark about this in the documentation. Task-number: QTBUG-105804 Pick-to: 6.5 6.4 6.2 5.15 Change-Id: If7c64f3ab7d2c3b1487fe56204a4e66c420b0604 Reviewed-by: Thiago Macieira <thiago.macieira@intel.com> Reviewed-by: Edward Welbourne <edward.welbourne@qt.io>
Diffstat (limited to 'src/corelib/io/qfileinfo.cpp')
-rw-r--r--src/corelib/io/qfileinfo.cpp5
1 files changed, 5 insertions, 0 deletions
diff --git a/src/corelib/io/qfileinfo.cpp b/src/corelib/io/qfileinfo.cpp
index 22127d86a2..a44f72942a 100644
--- a/src/corelib/io/qfileinfo.cpp
+++ b/src/corelib/io/qfileinfo.cpp
@@ -273,6 +273,11 @@ QDateTime &QFileInfoPrivate::getFileTime(QAbstractFileEngine::FileTime request)
\snippet ntfsp.cpp 1
+ \note Since this is a non-atomic global variable, it is only safe
+ to increment or decrement \c qt_ntfs_permission_lookup before any
+ threads other than the main thread have started or after every thread
+ other than the main thread has ended.
+
\section1 Performance Considerations
Some of QFileInfo's functions query the file system, but for