[Clam-devel] Consume and Produce considered evil

David García Garzón dgarcia at iua.upf.edu
Tue May 15 14:57:05 PDT 2007


I fully agree. Calling those functions is something that could be done by the 
framework transparently with any published ports.


On Dimarts 15 Maig 2007, Xavier Amatriain wrote:
> (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.



-- 
David García Garzón
(Work) dgarcia at iua dot upf anotherdot es
http://www.iua.upf.edu/~dgarcia
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 189 bytes
Desc: not available
URL: <http://lists.clam-project.org/pipermail/clam-devel-clam-project.org/attachments/20070515/c2a8949d/attachment.sig>


More information about the clam-devel mailing list