What do you want from Flush? It simply calls corresponding system function, and thats all. So it behaves just how system defines. It seems that you want real time system.
HUH???
I was asking for the existence of a function inherent in LazSerial that would simply discard the
incoming data buffer. But I could also just read the totality and throw it away. This was in my post on the subject.
And it is all caused by the fact that in the original code the two components to be replaced had such a function.
As for threading, you want others to do all job for you. Place the communications in separate thread yourself, what's the problem?
The problem is that the original code I am trying to port is written using a simple event controlled structure and I do not want to change that into a threading system. Too much work.
This is a peer to peer forum and is meant for Lazarus/Fpc questions to be asked and hopefully answered. It is no place for flame war....
I have been using Delphi since 1996, what experience do you have?