This is the mail archive of the java-patches@gcc.gnu.org mailing list for the Java project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

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


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.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]