[Lazarus] Cross-compiling for Raspberry Pi2

Michael Schnell mschnell at lumino.de
Tue Sep 22 10:00:12 CEST 2015


On 09/21/2015 04:42 PM, Bo Berglund wrote:
> Unfortunately since the existing code is built on non-blocking serial 
> communications and events to handle the data reception ...

You can convert a blocking socket (or serial port receive) to be a 
non-blocking Event-triggering (i.e. Delphi-Paradigm based) code by 
encapsulating the blocking API in a thread and fire an event to the main 
threads by TThread.Synchronize, TThread.Queue or 
Application.QueueAsyncCall. Now you can do the complex work in the main 
Thread event.

-Michael





More information about the Lazarus mailing list