On 09/01/2011 10:37 PM, Harry van Haaren wrote:
Hmm, i used Functors and Closures in jass for passing commands to the
realtime thread and wrote a small article about it.
Coupled with a poor man's garbage collection scheme using
boost::shared_ptr's this was a quite quick way to hack up jass. There's
no need to introduce new types if you want to do something new. Actually
there's only exactly one type that gets passed through the command
ringbuffer and that is boost::function. See e.g.
I agree that this method doesn't necessarily scale to other kind of
applications and it also might be a bit more error prone than a well
thought out event system using types that cover all bases, it does make
for a quite good solution for an app of the scope of jass..
Taking a look..
Linux-audio-dev mailing list