Do not start async read again if FIFO has no more data


The FIFO reading currently happens in chunks. The current
operation starts reading again even if there is no byte
available instead of waiting. This increases the overhead
of the library needlessly.

The correct thing to do is to wait instead of start reading
again when the last chunk is already handled.

Tested on Windows 8 using the on-board and the USB serial
ports and using Qt4 and Qt5.

Change-Id: I1926b853d1666b273d6d67b4a3f40261f1ed54ff
Reviewed-by: Sergey Belyashov <Sergey.Belyashov@gmail.com>
Reviewed-by: Laszlo Papp <lpapp@kde.org>
commit2360c401ae2012ed1b5a2b470a088cbbdb0d7f27
parent4a634dde17361f41b83c92f562714daf8aa51249
authorDenis Shienkov <denis.shienkov@gmail.com>
committerThe Qt Project <gerrit-noreply@qt-project.org>
commit timeMon, 14 Apr 2014 14:07:35 +0200