Multiple processes using #nextPutAll:

Klaus D. Witzel klaus.witzel at cobss.com
Sat May 26 14:37:44 UTC 2007


Hi Bert,

on Sat, 26 May 2007 16:22:30 +0200, you wrote:

> On Sat, 26 May 2007 14:12:59 +0200, Damien Cassou wrote:
>> Thank you for this comments. That was what I was afraid of. Is it
>> possible to have test that will show #nextPutAll: is not protected?
>
> I'm not convinced #nextPutAll: should be atomic. It would mean a  
> consumer cannot start processing queued items before all elements are  
> written. Right now, #nextPutAll: uses #nextPut:

In the example Damien used in this thread and in the implementation of  
#nextPutAll: in Nile and the classic WriteStream on String, #nextPut: is  
not used by #nextPutAll:.

Instead, #nextPutAll: updates at least one or more instance variables  
(besides appending the elements of the argument). This all together must  
be atomic, otherwise the system will be blown up.

/Klaus




More information about the Squeak-dev mailing list