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: gnu.java.net: Making methods in socket impl synchronized


>>>>> "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


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