Am Dienstag, 5. Juni 2007 16:42 schrieb Lee Jenkins:
> Hi all,
>
> I need to build a GUI application where a spawned thread will open a
> socket, receive messages and the controls on the form (TStringGride,
> etc) will need to be updated with values received from the socket.
>
> Should I use a critical section for this?  I remember that Delphi has
> a method for interacting with the main thread from other threads, is
> this supported in Laz/FPC?

Yes, just like in delphi TThread.Synchonize.
However, I usually try to avoid it whenever I can, because it suspends 
your thread until the synchonized function is executed by the main 
thread ..

regards 
  Burkhard

_________________________________________________________________
     To unsubscribe: mail [EMAIL PROTECTED] with
                "unsubscribe" as the Subject
   archives at http://www.lazarus.freepascal.org/mailarchives

Reply via email to