|
I notice...
rs := ReadStream on: #( 1 2 3 4 5 6 7 8 9).
rs do: [ :x | self inform: x printString ].
==> shows 10 notifications.
but...
rws := ReadWriteStream on: #( 1 2 3 4 5 6 7 8 9).
rws do: [ :x | self inform: x printString ]
==> nothing
it seems because "readLimit" instance variable of ReadWriteStream is zero.
Comparing...
ReadStream(PositionalStream)>>on: aCollection
readLimit := aCollection size.
ReadWriteStream(WriteStream)>>on: aCollection
readLimit := 0.
I wonder if ReadWriteStream should override #on: to set readLimit
similar to ReadStream, but are there subtleties in the stream
hierarchy I'm not aware of ?
cheers -ben
|