[Lazarus] TThread.Queue vs Application.QueueAsyncCall

Luca Olivetti luca at wetron.es
Mon Jul 17 19:01:59 CEST 2023


Hello,

TThread.Queue and Application.QueueAsyncCall more or less do the same 
thing (even if they use two different queues that are managed at 
different times in the main thread).

When it's better to use one or the other?

When you're not using Lazarus' TApplication obviously you cannot use 
QueueAsyncCall, but for a gui application which one is preferable?

Just curious, after having used "Synchronize" forever (the only option 
when I began using delphi, apart from PostMessage), I recently switched 
to QueueAsyncCall so that a thread can go on without waiting and now I 
discovered TThread.Queue.

Bye
-- 
Luca Olivetti
Wetron Automation Technology https://wetron.es/
Tel. +34 93 5883004 (Ext.3010)  Fax +34 93 5883007


More information about the lazarus mailing list