This is the mail archive of the
mailing list for the Java project.
Re: Patch [ecj]: Fix cross-configury issues / compile ecj.jar for non-shared builds
- From: Andrew Haley <aph at redhat dot com>
- To: Mohan Embar <gnustuff at thisiscool dot com>
- Cc: java-patches at gcc dot gnu dot org, Adam Megacz <adam at megacz dot com>, tromey at redhat dot com
- Date: Thu, 7 Dec 2006 15:09:52 +0000
- Subject: Re: Patch [ecj]: Fix cross-configury issues / compile ecj.jar for non-shared builds
- References: <email@example.com> <ZV3HE1TXS0761C0WQYT43C8F0HBNHLH.4578142c@d9300>
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
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.