[Lazarus] Windows.PostMessage vs Application.QueueAsyncCall

zeljko zeljko at holobit.net
Mon Mar 17 11:03:57 CET 2014


On 03/17/2014 10:56 AM, Michael Schnell wrote:
> On 03/16/2014 02:47 AM, Marcos Douglas wrote:
>> Like all Windows programmer, I use PostMessage/SendMessage a lot.
>> Lazarus team has created Application.QueueAsyncCall method to
>> substitute the (old) "Windowish" method todo async calls aka
>> PostMessage.
>>
>> Ok. But what is the best way to use QueueAsyncCall when the caller to
>> not knows what type is the receiver?
> As QueueAsyncCall does not exist in Delphi you might want to avoid it to
> stay Delphi compatible.

I don't care about Delphi compatibility in any case (in my 
applications).I'm using Lazarus and don't have any plan to use any 
commercial developer tool in the future. :)


> So you can use TThread.Queue that is available both in Delphi (even
> though undocumented in some older versions) and in Lazarus/fpc (even
> though only in the not too old versions).

No, I'll keep using QueueAsyncCall as it is because it satisfies my needs.

zeljko




More information about the Lazarus mailing list