[Lazarus] Help: Multithreading
Michael Schnell
mschnell at lumino.de
Thu Aug 16 13:05:58 CEST 2012
On 08/16/2012 11:01 AM, Mark Morgan Lloyd wrote:
>
> Although it's difficult to make definite points without knowing how
> the code is interfacing to the port. For example, if it's in a tight
> loop polling for input then of course things will slow down.
My suggestion is based on using the serial device in blocking mode and
not doing much extended work in the "driver" thread, just handling the
basic protocol to receive a block of data.
So there will be no "tight" loop in the thread.
The important point is that there will be no "tight" or long winding
loop in the main thread as well, as same works strictly based on events
(fired by the GUI and by the "driver" thread.
-Michael
More information about the Lazarus
mailing list