On 01/20/2011 01:20 PM, Henry Vermaak wrote:

No, it's very easy to do.  At least gtk and qt has dedicated functions
to do just this (g_main_context_wakeup() and QEventLoop::wakeUp()).
Lazarus just has to do this after QueueAsyncCall (I do this manually
myself for the moment).
I suppose this is (or should be) done in WakeMainThread that called by Synchronize in classes.inc.

But nonetheless my example shows that Synchronize does not work correctly (only firing the Event when additionally a GUI Event is handled).

Moreover I feel that it would be appropriate to implement TThread.Synchronize and PostMessage, (plus the yet not existing PostThreadMessage and TThread.Queue) on top of TApplication.QueuAsyncCall, so that all of them should work, once QueuAsyncCall is done.

-Michael

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

Reply via email to