On Fri, Oct 27, 2000 at 06:13:32AM +0900, hipster wrote:
> Matz has occasionally expressed his worries about the synchronization
> primitive used in Ruby today. He asked for suggestions regarding alternate
> schemes, and guess what, I wrote one. The following discusses object locks,
> a concept known from Java and others. These object locks would replace the
> current Thread.critical notation.

The problem with object locks--and a great many of the other suggestions
for primitives--is that they are fairly low-level. They represent the
state of the art for the 1970s, but not for what's possible today. For
Java's approach in particular, I recommend reading Per Brinch Hansen's
critique [2] before even thinking of using it. But in general, I suggest
that prior to changing the language people familiarize themselves with
the current state of the art for writing reliable concurrent programs,
specifically the field of coordination languages [1]. If you just need a
basic mechanism, the current primitives supplied by Thread are more than
adequate. But none of the proposals that I've seen so far really have
benefits that exceed those offered by Thread--they are just different
ways to skin the same cat, and not very good ways, either.

I apologize if this sounds a bit harsh--but it is my field of research,
and right now the discussion seems to focus on stuff that was old a
decade ago.

			Reimer Behrends

[1] F. Arbab and G. A. Papadopoulos. Coordination Models and Languages.
    In The Engineering of Large Systems. Advances in Computers. Academic
    Press, 1998. URL: <http://www.cwi.nl/ftp/manifold/AICbook.ps.Z>

[2] P. Brinch Hansen. Java's Insecure Parallelism. ACM SIGPLAN Notices
    34 (4), 38-45 (1999).