summaryrefslogtreecommitdiffstats
path: root/src/corelib/io/qwinoverlappedionotifier_p.h
diff options
context:
space:
mode:
authorJoerg Bornemann <joerg.bornemann@digia.com>2012-11-01 14:57:27 +0100
committerThe Qt Project <gerrit-noreply@qt-project.org>2012-11-02 18:07:35 +0100
commit40c9a3ef11ba8b513633dce3d0cf352efdf2352e (patch)
tree5b208f908b0540674439807dd93ab776fc220f4e /src/corelib/io/qwinoverlappedionotifier_p.h
parent76dfe82addb4e4954246d5ba9dc693315f0cdb6a (diff)
fix cleanup of QWinIoCompletionPort
The QWinIoCompletionPort thread was never properly cleaned up. Maintain a reference count for QWinIoCompletionPort and create/destroy it on demand. Change-Id: I607b574484554dd3ad107dfb43b0a248bcf8b7a4 Reviewed-by: Oswald Buddenhagen <oswald.buddenhagen@digia.com>
Diffstat (limited to 'src/corelib/io/qwinoverlappedionotifier_p.h')
-rw-r--r--src/corelib/io/qwinoverlappedionotifier_p.h5
1 files changed, 5 insertions, 0 deletions
diff --git a/src/corelib/io/qwinoverlappedionotifier_p.h b/src/corelib/io/qwinoverlappedionotifier_p.h
index 331d915ccc..d8d851a3a1 100644
--- a/src/corelib/io/qwinoverlappedionotifier_p.h
+++ b/src/corelib/io/qwinoverlappedionotifier_p.h
@@ -61,6 +61,8 @@ QT_BEGIN_HEADER
QT_BEGIN_NAMESPACE
+class QWinIoCompletionPort;
+
class Q_CORE_EXPORT QWinOverlappedIoNotifier : public QObject
{
Q_OBJECT
@@ -85,6 +87,9 @@ private:
void notify(DWORD numberOfBytes, DWORD errorCode, OVERLAPPED *overlapped);
private:
+ static QWinIoCompletionPort *iocp;
+ static HANDLE iocpInstanceLock;
+ static unsigned int iocpInstanceRefCount;
HANDLE hHandle;
HANDLE hSemaphore;
HANDLE hResultsMutex;