Le jeudi 09 février 2006 à 16:56 +0100, Andrés Becerra Sandoval a
écrit :
> Hello,
> 
> As the stream Xs is a local variable, when the execution of the local
> .. end  block finishes, the garbage collector can recycle it.
> It will not do it before the threads doing the sum finish their
> execution, because they have a dependency on Xs.
> 
> So, Xs ** will be ** recycled automaticaly, and after the two sums
> finish correctly !

Right, I was thinking about something like that...

The problems remains that this forces to maintain the whole stream
in-memory (explosion of ressource usage), whereas a single-consummer
stream could be implemented as a bounded buffer. Oh well, bounded
buffers are explained pp 263-264 using an intermediate buffer thread ...
my reading of the book (tm) was somewhat too eager ...

Thanks,
Aurélien.


_________________________________________________________________________________
mozart-users mailing list                               
[email protected]
http://www.mozart-oz.org/mailman/listinfo/mozart-users

Reply via email to