[Lazarus] SdpoSerial Tx and Rx buffers?
Bo Berglund
bo.berglund at gmail.com
Wed Feb 16 18:14:55 CET 2011
On Wed, 16 Feb 2011 10:50:14 +0100, Michael Schnell
<mschnell at lumino.de> wrote:
>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
Exactly...
--
Bo Berglund
Developer in Sweden
More information about the Lazarus
mailing list