[Lazarus] Even more radical suggestion regarding Event Queues

Henry Vermaak henry.vermaak at gmail.com
Fri Jan 21 13:05:25 CET 2011


On 21/01/11 11:35, Michael Schnell wrote:
> In the thread "Event handling example project: results for gtk2 and
> fpGUI" I already stated that it suffers from the same problem as
> TThread.Synchronize.

That doesn't mean it isn't "done", that means it has a bug.

> So in fact it might be a good idea to file another bug report.
> I think it would be best to put the "Event handling example project" in
> the "examples" directory in the svn, so it can easily be used for
> testing and I can mention same in the bug report.

Yes, report another bug for synchronise and attach the test project 
there.  I don't see a reason why it should be in the repo.

>> As far as I can see, it just needs to wake up the main thread when a
>> message is queued (something I do manually for now).
> Hmm. If you do the same that synchronize does (i. e. call
> "WakeUpMainThread" ) I don't think it will work (with gkt).

As I've said in the bug report, I call 
g_main_context_wakeup(g_main_context_default) myself to wake up the 
loop.  This works perfectly, but is obviously suboptimal, since it need 
to be inside an ifdef.

Henry




More information about the Lazarus mailing list