[Date Prev][Date Next][Thread Prev][Thread Next]
- Subject: Re: Lua Event driven programming
- From: steve donovan <steve.j.donovan@...>
- Date: Tue, 2 Jun 2009 10:12:54 +0200
On Tue, Jun 2, 2009 at 3:21 AM, RJP Computing <email@example.com> wrote:
> I have been reading this post and hopping for a small example. Can someone
> explain if I have a C[++] thread that fires an event to Lua how it can
> "hook-up" in a thread safe way to the event?
I remember having to deal with this self-same issue with SciTE
extensions. The issue is often that the actual event happens in
another thread, but must be raised in the main GUI thread. In that
case, I had a worker thread that read output from a process, which
then posted a message to a little hidden window, which could then
raise the event safely; there is an equivalent GTK mechanism.
I can post the SciTE extension code if anyone is interested.