[squeak-dev] SharedQueue does scale

Stephen Pair stephen at pairhome.net
Wed Oct 20 19:25:33 UTC 2010


The thing that always bothered me about SharedQueue (aside from some bugs
that may be long gone) was that it didn't really behave quite like a stream
(and I wanted to be able to use it with code written for streams)...I
took Göran's SharedStreams and took it a bit further to try and be fully
compatible with code that expected read or write streams (and at least one
version I did would work efficiently for characters and bytes but still
support full objects).  It also tried to firm up the concepts of end of
stream vs. buffer under-run (with both blocking and non-blocking protocols
when there is an under run.  I believe a version would also support buffer
over-runs on insertion if you wanted to cap the size of the buffer (with
similar choice about whether to block or not when hitting an overrun on
insert).

Unifying this with streams in the base image would be a good thing.  As
would firming up the concepts of end of stream, under-run, over-run as well
as separate protocols for blocking vs non-blocking APIs (for over-run and
under-run) in the entire stream framework.  The protocols for reading and
writing should also be clearly delineated (and perhaps separate objects
should always be used for the reading and writing and the object that acts
as the collection or buffer should be factored out and its protocol well
articulated).

- Stephen

2010/10/18 Göran Krampe <goran at krampe.se>

> Hi guys!
>
> I am in China and haven't read this thread etc, but regarding improved
> SharedQueue - have you looked at SharedStreams:
>
> http://map.squeak.org/packagebyname/sharedstreams
>
> ...the SharedBufferStream in there was much faster for lots of objects or
> characters, since it relied on primitives. In fact, a looooong time ago
> Stephen Pair thought it should have replaced SharedQueue.
>
> regards, Göran
>
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://lists.squeakfoundation.org/pipermail/squeak-dev/attachments/20101020/9b199089/attachment.htm


More information about the Squeak-dev mailing list