This is the mail archive of the
java-patches@gcc.gnu.org
mailing list for the Java project.
Re: [PATCH] for Review: SelectorImpl.wakeup() + Synchronization
- From: Michael Koch <konqueror at gmx dot de>
- To: Mohan Embar <gnustuff at thisiscool dot com>
- Cc: Michael Koch <konqueror at gmx dot de>, GCJ Patches <java-patches at gcc dot gnu dot org>
- Date: Fri, 19 Dec 2003 16:44:35 +0100
- Subject: Re: [PATCH] for Review: SelectorImpl.wakeup() + Synchronization
- References: <20031219140155.GD16362@mail.konqueror.de> <P4WHBCB5YTROM04QMQNXUT2WECGEHB.3fe31880@p733>
On Fri, Dec 19, 2003 at 09:25:52AM -0600, Mohan Embar wrote:
> >> + private boolean unhandledWakeup = false;
> >
> >false is the default value of boolean and not explicitely needed.
>
> Is this the official libgcj stance? I understand default values in Java,
> but as a matter of style, I initialize all fields either explicitly
> or in the constructor. This being said, I'm searching the web
> for some document to back me up and I can't find anything
> after a quick search....
AFAIK this falls under the "redundancy" rule. We dont write redundant
stuff. ;-)
>
> >> + throw new ClosedSelectorException ();
> >
> >Dont add "space" between method/constructor name and '('. There are
> >serveral instances of this misformatting. I know I said different in the
> >past but tromey enlightened me.
>
> Are we doing this differently than C?:
>
> http://www.gnu.org/prep/standards_23.html#SEC23
>
> If so, why? (Not that I'm complaining about not having this space, I'd
> gladly remove these from the C/C++ code too if Father GNU didn't make
> me put them there.)
Yeah, we are different here. I wondered too but tromey told me to leave
the space out.
> >> - /**
> >> - * Marks the beginning of an I/O operation that might block indefinitely.
> >> - */
> >> - protected final void begin()
> >> - {
> >> - }
> >> -
> >> - /**
> >> - * Marks the end of an I/O operation that might block indefinitely.
> >> - */
> >> - protected final void end()
> >> - {
> >> - }
> >> -
> >
> >Why do you remove methods required by the official API ?
>
> Oops. I should have realized that this was a "real" class. I'll put this
> back in, but based on my implementation, do you think these really
> need to be overridden in SelectorImpl? I wouldn't know what I'd put
> in them.
Its needed to tell the thread doing the seletion if the selector was
asynchroniously closed or interrupted by another thread.
Michael