On Wed, 16 Feb 2011 10:50:14 +0100, Michael Schnell <[email protected]> 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 -- _______________________________________________ Lazarus mailing list [email protected] http://lists.lazarus.freepascal.org/mailman/listinfo/lazarus
