[Date Prev][Date Next][Thread Prev][Thread Next]
- Subject: Re: General purpose notification mechanism for Lua
- From: David Kastrup <dak@...>
- Date: Thu, 31 Dec 2009 10:45:29 +0100
Tiago Katcipis <email@example.com> writes:
> First of all, this is my first post on this list, forgive me if the
> question is not brilliant :-).
> I am starting to develop a application on Lua and since there is the
> need to do a lot of communication between objects, to loose coupling i
> was thinking on using some kind of generic purpose notification system
> like GSignal (http://
> library.gnome.org/devel/gobject/unstable/gobject-Signals.html), or
> like the event system used on QT, using something like this raises the
> flexibility of the system. Building a notification system in Lua is
> not very hard, but it is useless to build a new one if maybe there is
> something already done.
The one thing you should keep in mind is that most signaling frameworks
are a crutch for obliterating independent control flows by some
Lua has synchronous coroutines which allow you to use normal function
calls for passing information between independent control flows.
coroutine.wrap is most of what you need for working with the equivalent