Bill Pugh wrote:
> We've discussed needing some phrase we can use instead of
> "creates a happens-before edge" in places such as
> Javadoc.
> 
> One proposal was "Synchronizes with", but I don't like that because
> it sound symmetric, and doesn't convey the directed nature of 
> synchronization.
> 
> So what do you think about "synchronizes to" (and "synchronizes from")?
> 
> For example,
>     starting a thread synchronizes to the run method of the thread
>     successful joining with a thread synchronizes from the run method of 
> the thread
> 
> -------------------------------
> JavaMemoryModel mailing list - http://www.cs.umd.edu/~pugh/java/memoryModel
I dislike the use of "to" and "from" with synchronized.  It sounds
unnatural to me, and I wouldn't know what it meant.  I can easily
infer the meaning in this case, but that's no better than using
"synchronized with", which at least sounds better.
Did we decide that using "happens-before" (with hyphen) was too
subtle and likely to be missed?
   starting a thread happens-before the run method of the thread
(Of course, that would not give us the inverse relation without
another definition.  But we could define happens-after to be that
inverse.)
If the desire is to avoid sounding too technical, then perhaps:
  starting a thread must occur before the run method of the thread
  successful joining with a thread must occur after the run method...
In all the above examples, I think "the run method" should really
be replaced with a specific event, e.g., "starting a thread must
occur before the invocation of the run method..."
If retaining "synchronized" is important, then perhaps we can say
   starting a thread is synchronized before the invocation of ...
   successful joining with a thread is synchronized after ...
The main objection I have to this last version is that "synchronized"
implies a similarity in time, so "synchronized before/after" is an
oxymoron of a sort.  Of course, we are using the term in a technical
sense, so we can have it mean whatever we want.  But using that
reasoning, I think we should just revert to using the technical
happens-before relation.
                                    Victor
-------------------------------
JavaMemoryModel mailing list - http://www.cs.umd.edu/~pugh/java/memoryModel
This archive was generated by hypermail 2b29 : Thu Oct 13 2005 - 07:01:01 EDT