This is the mail archive of the
java-patches@gcc.gnu.org
mailing list for the Java project.
Re: Patch: gnu.java.net: Making methods in socket impl synchronized
- From: Tom Tromey <tromey at redhat dot com>
- To: Michael Koch <konqueror at gmx dot de>
- Cc: java-patches at gcc dot gnu dot org
- Date: 01 Dec 2003 12:11:32 -0700
- Subject: Re: Patch: gnu.java.net: Making methods in socket impl synchronized
- References: <E1AOiVE-0001NV-00@majestix.konqueror.de>
- Reply-to: tromey at redhat dot com
>>>>> "Michael" == Michael Koch <konqueror@gmx.de> writes:
Michael> I wrote a little patch to make some methods in
Michael> gnu.java.net.PlainSocketImpl and
Michael> gnu.java.net.PlainDatagramSocketImpl synchroized. I have no
Michael> real opinion if this is really needed but the classpath
Michael> version does it and I think I is good.
A few notes on this.
First, "synchronized native" has no special effect for CNI methods.
It only synchronizes JNI methods. I've considered adding a warning
for this, but it would only cause problems for libgcj, due to
classpath merging.
So if we add these "synchronized" keywords, shouldn't we also add
actual synchronization to the CNI methods?
And if these methods don't need synchronization, shouldn't we just
remove "synchronized" from the declarations in classpath?
Tom