<div>The thing that always bothered me about SharedQueue (aside from some bugs that may be long gone) was that it didn&#39;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&#39;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).</div>

<div><br></div><div>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).</div>

<div><br></div><div>- Stephen<br><br><div class="gmail_quote">2010/10/18 Göran Krampe <span dir="ltr">&lt;<a href="mailto:goran@krampe.se">goran@krampe.se</a>&gt;</span><br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex;">

Hi guys!<br>
<br>
I am in China and haven&#39;t read this thread etc, but regarding improved SharedQueue - have you looked at SharedStreams:<br>
<br>
<a href="http://map.squeak.org/packagebyname/sharedstreams" target="_blank">http://map.squeak.org/packagebyname/sharedstreams</a><br>
<br>
...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.<br>
<br>
regards, Göran<br>
<br>
</blockquote></div><br></div>