summaryrefslogtreecommitdiff
path: root/src/serialport/qserialport.h
diff options
context:
space:
mode:
authorDenis Shienkov <denis.shienkov@gmail.com>2014-11-21 22:20:41 +0300
committerDenis Shienkov <denis.shienkov@gmail.com>2014-11-27 12:31:24 +0100
commit38f43b390e5b27f6243ba781394ad2418ead6b74 (patch)
tree73e7c24489ba463e430206b35e5fc855e7f7ef34 /src/serialport/qserialport.h
parent721faa9486dc0a6d8b6e1f2214ae040a2264a2e3 (diff)
downloadqtserialport-38f43b390e5b27f6243ba781394ad2418ead6b74.tar.gz
Use QWinOverlappedIoNotifier instead of QWinEventNotifier
The reasons of this change are following: 1) Implementation of QEventDispatcherWin32 has restrictions to maximum quantity of QWinEvenNotifier instances in one thread. Method QEventDispatcherWin32::registerEventNotifier() registers the [MAXIMUM_WAIT_OBJECTS - 2] numbers of notifiers only. Where the MAXIMUM_WAIT_OBJECTS that is equal to 64, since it is a part of "Multiple-object Wait Functions" API: http://msdn.microsoft.com/en-us/library/windows/desktop/ms687069%28v=vs.85%29.aspx 2) There is need to have three instances of QWinEventNotifier to watch I/O events of each serial port. It has limits to the maximum number of used serial ports and it is [(MAXIMUM_WAIT_OBJECTS - 2) / 3] = 20 for the one thread. 3) Attempting to move or to resize a window of GUI application lead to suspending of I/O events from serial port. A long suspension can lead to overflowing of FIFO of device, so the data can be lost. All these shortcomings are resolved with QWinOverlappedIoNotifier, which uses the "I/O Completion Ports" API: http://msdn.microsoft.com/en-us/library/windows/desktop/aa365198%28v=vs.85%29.aspx Tested on Windows 8 with the virtual (com0com), on-board and the USB (PL2303) serial ports. Task-number: QTBUG-34946 Change-Id: I879d939f86c8dcde0fe21a8d6267e81152822aa4 Reviewed-by: Oswald Buddenhagen <oswald.buddenhagen@theqtcompany.com> Reviewed-by: Sergey Belyashov <Sergey.Belyashov@gmail.com>
Diffstat (limited to 'src/serialport/qserialport.h')
-rw-r--r--src/serialport/qserialport.h4
1 files changed, 1 insertions, 3 deletions
diff --git a/src/serialport/qserialport.h b/src/serialport/qserialport.h
index d1a66ce..295869d 100644
--- a/src/serialport/qserialport.h
+++ b/src/serialport/qserialport.h
@@ -275,10 +275,8 @@ private:
Q_DISABLE_COPY(QSerialPort)
#if defined (Q_OS_WIN32) || defined(Q_OS_WIN64)
- Q_PRIVATE_SLOT(d_func(), bool _q_completeAsyncCommunication())
- Q_PRIVATE_SLOT(d_func(), bool _q_completeAsyncRead())
- Q_PRIVATE_SLOT(d_func(), bool _q_completeAsyncWrite())
Q_PRIVATE_SLOT(d_func(), bool _q_startAsyncWrite())
+ Q_PRIVATE_SLOT(d_func(), void _q_notified(quint32, quint32, OVERLAPPED*))
#endif
};