> Please comment on this (and send code if you already have it):
>
> There will be a WorkInProgressStream (WIPStream :).
> A module creates a WIPStream, returns it (so that it can start serving),
> and continues writing to it (as if writing directly to the socket). When
> done, it just closes the WIPStream (probably means two threads).
I looked at the stream classes briefly with this in mind. Here are my
comments:
Consider naming it like ScrollingReadWriteStream
1. Reading and Writing to the stream needs to be process safe
2. It should be optimized in such a way that anything that has been read
from the stream can be discarded.
3. There should be some way for the writing process to mark the end of the
stream (perhaps by sending #close, and #atEnd would check for this marker).
Perhaps a separate inst var could indicate a closed status. If #close is
used, you should still be able to read from the stream until there is
nothing left to read.
4. The method #next: should wait until the requested number of characters
is available, or until the stream is closed.
You could probably get a lot of the implementation by looking at
SharedQueue.
- Stephen