Patch: gnu.java.net: Making methods in socket impl synchronized

David Daney ddaney@avtrex.com
Tue Nov 25 20:47:00 GMT 2003


Michael Koch wrote:

>Hi list,
>
>
>
>I wrote a little patch to make some methods in gnu.java.net.PlainSocketImpl 
>and gnu.java.net.PlainDatagramSocketImpl synchroized. I have no real opinion 
>if this is really needed but the classpath version does it and I think I is 
>good.
>
>Please review and comment.
>
>  
>
All of these methods are native.

Is the native code safe for reentrent calling?

A casual glance at natPlainSocketImplPosix.cc suggests that it is and 
that synchronization is not necessary.  Gratuitous synchronization is bad.

David Daney.



More information about the Java-patches mailing list