[Lazarus] FPC 2.6.2 + Thread.Queue?

Sven Barth pascaldragon at googlemail.com
Wed Apr 24 11:19:50 CEST 2013


Am 24.04.2013 11:06, schrieb Michael Schnell:
> On 04/24/2013 10:41 AM, Michael Van Canneyt wrote:
>>
>> By contrast it works only in lazarus GUI programs, and is useless 
>> e.g. for daemons.
>>
> Of course I do know that (as I issued the request for a "active" 
> non-GUI "Widget Type" with support for a Pascal EventQueue for 
> multiple platforms - like "mse" does provide ever since - already 
> years ago, and even tried to implement it myself but failed due to the 
> complexity of the Widget Type depending units in Lazarus).
>
> But AFAIK same is true for TThread.Queue(), and TThread.Synchronize 
> (requested by the OP).
Both TThread.Queue and TThread.Synchronize just need calls to 
CheckSynchronize to be processed. Which is normally done by the 
widgetset event loop, but can be done manually as well (I'm using this 
for example in a highly threaded console application; the main thread 
there just calls CheckSynchronize while the rest is done in threads).

Regards,
Sven




More information about the Lazarus mailing list