Patch [ecj]: Fix cross-configury issues / compile ecj.jar for non-shared builds

Andrew Haley aph@redhat.com
Thu Dec 7 15:10:00 GMT 2006


Mohan Embar writes:
 > Hi Andrew,
 > 
 > > > >From what I can determine by scanning the net, this is probably a call
 > > > >to WaitForSingleObject() in park() and a call to SetEvent() in
 > > > >unpark().  (See
 > > > >http://www.codersource.net/win32_waitforsingleobject.html,
 > > > >http://msdn.microsoft.com/library/default.asp?url=/library/en-us/dllproc/base/waitforsingleobject.asp.)
 > > > >It doesn't have to be anything more complicated than that.
 > 
 > >Oh, fair enough.  It's just that park() and unpark() are a bit
 > >underdocumented, so I wanted to make sure it was all clear.
 > 
 > I appreciate that. You've bascially saved me the trouble of sketching this out
 > myself.

Mmm, good.  

There are some very subtle details that are easy to miss: for example,
a Thread.interrupt() followed by a park() does not block the thread
because Thread.interrupt() always does an unpark().  This means that
there is no race between Thread.interrupt() and park(); it doesn't
matter in which order they occur.  I think your proposed change might
have broken that.

Andrew.



More information about the Java-patches mailing list