[Lazarus] FPC 2.6.2 + Thread.Queue?
Sven Barth
pascaldragon at googlemail.com
Wed Apr 24 21:43:33 CEST 2013
On 24.04.2013 15:13, Michael Schnell wrote:
> On 04/24/2013 11:52 AM, Sven Barth wrote:
>>
>> QueueAsyncCall can't do anything different, because it needs to go
>> through either TThread.Queue or TThread.Synchronize as the queue's
>> implementation is not directly accessible from the outside and I don't
>> intend to change this.
>>
> It can't be true that it goes through TThread.Synchronize (if not using
> a hidden parameter as done in Delphi), as this would trash the
> functionality.
>
> It does not seem to go through TThread.Queue as (1) in Lazarus/FPC it
> is older than TThread.Queue and (2) in this Forum thread it has been
> claimed that QueueAsyncCall does not work by means of checksynchronize,
> while TThread.Queue does-.
You misunderstood me (and maybe my answer wasn't clear enough to be
understood correctly). You said that "QueueAsyncCall might or might not
do the same". I thought that you mean a future implementation of
QueueAsyncCall which should use the same queue mechanism that
TThread.Queue and TThread.Synchronize use (both use the same). And in
that case this won't work, because the queueing mechanism is only
available in the Classes unit and if it uses TThread.Queue (let's put
aside TThread.Synchronize) then there is the problem that the mainthread
can not queue anything, because that will be executed immediately.
Regards,
Sven
More information about the Lazarus
mailing list