[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>
This commit is contained in:
Mate Barany 2023-01-11 17:55:16 +01:00
parent 1c62e821ba
commit 696ad54e5d
2 changed files with 10 additions and 0 deletions

View File

@ -109,6 +109,11 @@ void QFileDevicePrivate::setError(QFileDevice::FileError err, int errNum)
decrementing \c qt_ntfs_permission_lookup by 1.
\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.
*/
//************* QFileDevice

View File

@ -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