diff options
author | Denis Shienkov <denis.shienkov@gmail.com> | 2014-11-21 22:20:41 +0300 |
---|---|---|
committer | Denis Shienkov <denis.shienkov@gmail.com> | 2014-11-27 12:31:24 +0100 |
commit | 38f43b390e5b27f6243ba781394ad2418ead6b74 (patch) | |
tree | 73e7c24489ba463e430206b35e5fc855e7f7ef34 /src/serialport/qserialportinfo_wince.cpp | |
parent | 721faa9486dc0a6d8b6e1f2214ae040a2264a2e3 (diff) | |
download | qtserialport-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/qserialportinfo_wince.cpp')
0 files changed, 0 insertions, 0 deletions