summaryrefslogtreecommitdiffstats
path: root/src/network/socket
diff options
context:
space:
mode:
authorMarc Mutz <marc.mutz@kdab.com>2019-06-26 15:32:50 +0200
committerMarc Mutz <marc.mutz@kdab.com>2019-07-03 09:03:24 +0000
commit8d414e67941fdc45ab682b763a119ecc71291483 (patch)
tree6a32b1f6943370051bbf8a3962586d5845fa9900 /src/network/socket
parentfb353592261e04896ad417ce5ace8adda1fe9fdf (diff)
Mark QObject::deleteLater() as \threadsafe
Because it is. It's just QCoreApplication::postEvent(), which is thread-safe. It also _has_ to be, because we recommend to use deleteLater() to delete QObjects that live in another thread: Quoting the ~QObject() docs: > Warning: Deleting a QObject while pending events are waiting to be delivered > can cause a crash. You must not delete the QObject directly if it exists in > a different thread than the one currently executing. Use deleteLater() > instead, which will cause the event loop to delete the object after all > pending events have been delivered to it. If deleteLater() is not thread-safe, it cannot be used for one of its intended purposes. Change-Id: I333d506b42bdfcdff00fe6cefa234c21865625a6 Reviewed-by: MÃ¥rten Nordheim <marten.nordheim@qt.io>
Diffstat (limited to 'src/network/socket')
0 files changed, 0 insertions, 0 deletions