diff options
| author | Liang Qi <liang.qi@qt.io> | 2019-05-15 07:11:41 +0200 |
|---|---|---|
| committer | Liang Qi <liang.qi@qt.io> | 2019-05-15 07:11:41 +0200 |
| commit | c0359bd3c3a098ace9d2fa7ee91c33b24a8d9477 (patch) | |
| tree | 9bcae3bff2ccef2b020c7a9ef25b3643e9ae556f /src/corelib/tools/qsharedpointer.cpp | |
| parent | 68eea0196ebf30617e7d837ac5f61aaeeb814692 (diff) | |
| parent | 1e5deb06416b6efc33a2009d9678fd8f743c5ce7 (diff) | |
Merge remote-tracking branch 'origin/5.13' into dev
Conflicts:
src/corelib/global/qfloat16.cpp
src/corelib/global/qfloat16.h
src/plugins/platforms/windows/qwindowswindow.cpp
Change-Id: I0938aaa6a9771f55e48c95ed29f6f5291431b947
Diffstat (limited to 'src/corelib/tools/qsharedpointer.cpp')
| -rw-r--r-- | src/corelib/tools/qsharedpointer.cpp | 21 |
1 files changed, 13 insertions, 8 deletions
diff --git a/src/corelib/tools/qsharedpointer.cpp b/src/corelib/tools/qsharedpointer.cpp index 568d65df6b8..ad95176ae12 100644 --- a/src/corelib/tools/qsharedpointer.cpp +++ b/src/corelib/tools/qsharedpointer.cpp @@ -65,14 +65,19 @@ \section1 Thread-Safety - QSharedPointer and QWeakPointer are thread-safe and operate - atomically on the pointer value. Different threads can also access - the QSharedPointer or QWeakPointer pointing to the same object at - the same time without need for locking mechanisms. - - It should be noted that, while the pointer value can be accessed - in this manner, QSharedPointer and QWeakPointer provide no - guarantee about the object being pointed to. Thread-safety and + QSharedPointer and QWeakPointer are reentrant classes. This means that, in + general, a given QSharedPointer or QWeakPointer object \b{cannot} be + accessed by multiple threads at the same time without synchronization. + + Different QSharedPointer and QWeakPointer objects can safely be accessed + by multiple threads at the same time. This includes the case where they + hold pointers to the same object; the reference counting mechanism + is atomic, and no manual synchronization is required. + + It should be noted that, while the pointer value can be accessed in this + manner (that is, by multiple threads at the same time, without + synchronization), QSharedPointer and QWeakPointer provide no guarantee + about the object being pointed to. The specific thread-safety and reentrancy rules for that object still apply. \section1 Other Pointer Classes |
