On 01/21/2011 01:49 PM, Henry Vermaak wrote:

Yes. Look at TGtk2WidgetSet.InitSynchronizeSupport in gtk2widgetset.inc. It creates a pipe, which gets watched by the main loop. PrepareSynchronize then just writes something to the pipe, which wakes up the main func via the watched pipe. Or so the theory goes. I haven't really looked into it more closely.
OK, once again, IMHO, crafted a little bit short sighted. The init for Synchronize should not create it's own pope (AKA "Event Queue"), but all similar functionalities (i.e. TApplication.QueueAsyncCall, TThread.Synchronize, SendMessage, SendThreadMessage, TThread.Queue) should use a common queue (and in fact be based on the most flexible function (being QueuAsyncCall, providing a pointer as a parameter to the callee). This would result in more manageable code, Especially, if same is moved out of the Widget Type code and provided for all Widget Types to use, if they want to.

-Michael

--
_______________________________________________
Lazarus mailing list
[email protected]
http://lists.lazarus.freepascal.org/mailman/listinfo/lazarus

Reply via email to