Concurrency classes...

Philippe Marschall philippe.marschall at gmail.com
Fri Jan 26 11:23:37 UTC 2007


2007/1/26, Göran Krampe <goran at krampe.se>:
> Hi folks!
>
> I was googling for good concurrency classes for Java (cough) yesterday and
> discovered Doug Lea's util.concurrent
> (http://gee.cs.oswego.edu/dl/concurrency-interest/index.html) and the new
> java.util.concurrent in Java 1.5 resulting from Doug's work
> (http://java.sun.com/j2se/1.5.0/docs/guide/concurrency/overview.html).
>
> Now, this leads me to the question - how do we stack up in Squeak land?
>
> AFAIK we have this:
>
> 1. Semaphore - the basic building block.
> 2. Monitor - the new "better Semaphore", but on a higher level.
> 3. SharedQueue - a simple queue, has been improved relatively lately.
> 4. SharedBufferStream - a different implementation of SharedQueue that is
> more efficient and... well, a bit different. :) (my memory fails)
> 5. SharedBidirectionalStream - a combo of two SharedBufferStreams thus
> mimicking a SocketStream "in image" since it has two independent channels
> in both directions (like a SocketStream has). Quite fun to play with and
> useful for multiplexing (multiple Processes sharing a SocketStream) etc.
>
> (The two last classes are available in SharedStreams available on SM
> (http://map.squeak.org/packagebyname/sharedstreams))
>
> Surely we have lots more spread out in various places?
>
> I know that most of the time we get by fine with Monitor and SharedQueue,
> but some things that I feel are missing *and* would be useful is:
>
> - something for executing "tasks"
> - more concurrent Collections

We have also Mutex, which is a bit like Monitor, but simpler and with
only one Semaphore .....

Philippe


More information about the Squeak-dev mailing list