AnsweredAssumed Answered

What's the proper way of using VDK messages?

Question asked by yairraz on Sep 24, 2009
Latest reply on Sep 25, 2009 by SFernandez

In several examples (both in the VisualDSP install, and online training module), I've seen examples that reuse VDK messages, e.g.:

Thread1 creates messages at init time, and send them on a channel to thread2. Thread2 reads them, and send them back to thread1, which reuses them.


What is the tradeoffs between this method, and the simple (and logical method of):

-     Thread1 creates a message when needed, and sends to thread2

-     Thread2 pends on a message, and when receives is, gets its payload and then destroys it.


Obviously, method 2 is much easier to implement.


What method is to be used when writing complex applications?