Re: JavaMemoryModel: Thread Synchronization at Creation and Termination

From: Doug Lea (dl@cs.oswego.edu)
Date: Thu Feb 08 2001 - 07:54:27 EST


> Join is frequently implemented via a pthread_cond_wait or equivalent
> so it is natural that the mutex passed with the condition notify should
> cause memory update visibility - if implemented in a 'natural' manner.
> I realise his is just the 'model' I have in my head and that I may actually
> be in a minority to think along these lines?

No, you are entirely right. The current spec in effect mandates that a
dying thread perform a notifyAll, which entails synchronization. (It
does not mandate what monitor object is used though, so long as it is
that same one used by join.)

-Doug
-------------------------------
JavaMemoryModel mailing list - http://www.cs.umd.edu/~pugh/java/memoryModel



This archive was generated by hypermail 2b29 : Thu Oct 13 2005 - 07:00:30 EDT