ReadWriteStream>>on:
April 25, 2019
1:59 p.m.
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
2654
Age (days ago)
2654
Last active (days ago)
0 comments
1 participants
participants (1)
-
Ben Coman