[Clam-devel] Consume and Produce considered evil

Xavier Amatriain xavier at create.ucsb.edu
Tue May 15 11:23:54 PDT 2007

(The following refers to my own experience with my system. Please do not
try this at home ;)

Have you wondered what happens if you are developing a new Processing
class and you do something as innocent as forget to call Consume and
Produce for your ports?

If you are using Jack, the Jack server becomes unresponsive and you have
no way around it except for killing it.

If you are using PortAudio, it is even more fun ;) Your whole computer
becomes unresponsive and, in my case, I had no way around it except for
pressing the reset button!! (I could not even kill X although maybe I
could have logged in from a remote computed, did not try).

In any case, I think this is very unhealthy. If I understand correctly
it would not be that hard to detect a deadlock at the FlowControl level.

Another, and possibly better, solution would be to implement this at the
abstract class level, calling Consume and Produce for all ports from the
Do() (no arguments) function.

 *       Xavier Amatriain        *
 *  Associate Director - MATi    *
 *  Research Director - CREATE   *
 *    UCSB, Santa Barbara CA     *
 *      1-(805)- 893 83 52       *

More information about the clam-devel mailing list