diff options
author | axis <qt-info@nokia.com> | 2010-07-12 09:32:48 (GMT) |
---|---|---|
committer | axis <qt-info@nokia.com> | 2010-07-12 10:09:25 (GMT) |
commit | c042003a831ace1ffe4cc399668293200ffe829f (patch) | |
tree | 50c381aa81a0f2afcdb3cb20b4e20a7b4e9b6bc8 /src/corelib | |
parent | 28ad5063e0fd3e268408a2483c06413a454a2a61 (diff) | |
download | Qt-c042003a831ace1ffe4cc399668293200ffe829f.zip Qt-c042003a831ace1ffe4cc399668293200ffe829f.tar.gz Qt-c042003a831ace1ffe4cc399668293200ffe829f.tar.bz2 |
Added some asserts to avoid race conditions in networking.
Task: QT-3358
RevBy: Markus Goetz
Diffstat (limited to 'src/corelib')
-rw-r--r-- | src/corelib/kernel/qeventdispatcher_symbian.cpp | 6 |
1 files changed, 6 insertions, 0 deletions
diff --git a/src/corelib/kernel/qeventdispatcher_symbian.cpp b/src/corelib/kernel/qeventdispatcher_symbian.cpp index e86efb2..c3e0808 100644 --- a/src/corelib/kernel/qeventdispatcher_symbian.cpp +++ b/src/corelib/kernel/qeventdispatcher_symbian.cpp @@ -495,6 +495,8 @@ void QSelectThread::requestSocketEvents ( QSocketNotifier *notifier, TRequestSta start(); } + Q_ASSERT(QThread::currentThread() == this->thread()); + QSelectMutexGrabber lock(m_pipeEnds[1], &m_mutex); Q_ASSERT(!m_AOStatuses.contains(notifier)); @@ -506,6 +508,8 @@ void QSelectThread::requestSocketEvents ( QSocketNotifier *notifier, TRequestSta void QSelectThread::cancelSocketEvents ( QSocketNotifier *notifier ) { + Q_ASSERT(QThread::currentThread() == this->thread()); + QSelectMutexGrabber lock(m_pipeEnds[1], &m_mutex); m_AOStatuses.remove(notifier); @@ -515,6 +519,8 @@ void QSelectThread::cancelSocketEvents ( QSocketNotifier *notifier ) void QSelectThread::restart() { + Q_ASSERT(QThread::currentThread() == this->thread()); + QSelectMutexGrabber lock(m_pipeEnds[1], &m_mutex); m_waitCond.wakeAll(); |