[Lazarus] SdpoSerial Tx and Rx buffers?

Michael Schnell mschnell at lumino.de
Wed Feb 16 10:50:14 CET 2011


On 02/14/2011 08:32 PM, Bo Berglund wrote:
>
> In a blocking design this wait loop would of course not have been
> needed becaus ethe Write would not return until all data have been
> written to the output.
But here the program's GUI stops working, as the software hangs in the 
blocking read or write,

So IMHO, the only decent way to handle a serial interface is doing 
blocking communications calls in threads and fire events in the main 
thread (e.g. by Application.QueuAsyncCall (avoiding the "Windowish" 
PostMessage() stuff ) ) .

And here, of course, you do need buffers to transfer data between the 
main thread and the threads




More information about the Lazarus mailing list