[ENH]Shared streams (v 0.9)

goran.hultgren at bluefish.se goran.hultgren at bluefish.se
Wed Apr 10 15:16:22 UTC 2002

We have constructed two interesting objects for communication between
Squeak Processes - SharedBufferStream and SharedBidirectionalStream.

They are modelled after patterns found in SharedQueue,
BufferStream/SocketStream (in Comanche) and we have tried to be careful
when it comes to making these two guys really threadsafe (in the process
we discovered some small potential bugs in SharedQueue actually, fix
comes later). They both handle multiple concurrent readers AND writers.

This changeset includes only these three new classes - no changes to
existing classes.
Has been tested in 3.2g-4811. Play with the examples.


- Write a bunch of tests of course... :-)
- Ensure that close-logic and buffered/flush works. Those things have
not been tested yet.

>From preamble:

Change Set:		SharedStreams
Date:			10 April 2002
Author:			Göran Hultgren

SharedBufferStream and SharedBidirectionalStream are
two character/byte based streams that can be used for
communication between Processes. Both handle
multiple readers and writers. They are modelled after
patterns found in SharedQueue and the classes
BufferStream/SocketStream that are included in Comanche.

Look at examples on class side of both classes.

ObjectMonitor is a simple variant of ObjectTracer to
simplify debugging problems with multiple Processes and
-------------- next part --------------
A non-text attachment was scrubbed...
Name: SharedStreams.3.cs.gz
Type: application/octet-stream
Size: 7695 bytes
Desc: not available
Url : http://lists.squeakfoundation.org/pipermail/squeak-dev/attachments/20020410/dce06106/SharedStreams.3.cs.obj

More information about the Squeak-dev mailing list