Patch: gnu.java.net.PlainDatagramSocketImpl

Bryce McKinlay mckinlay@redhat.com
Mon Apr 12 22:43:00 GMT 2004


Michael Koch wrote:

>I just looked into merging gnu.java.net.PlainDatagramSocketImpl more 
>with classpath. I dont if there are better ways in CNI then this.
>
>Any comments ? Okay for trunk ?
>
>+  /**
>+   * Lock object to serialize threads wanting to receive 
>+   */
>+  private final Object RECEIVE_LOCK = new Object();
>+  
>+  /**
>+   * Lock object to serialize threads wanting to send 
>+   */
>+  private final Object SEND_LOCK = new Object();
>+
>  
>

Hi Michael,

Are these locks really neccessary? Obviously they are a bad idea from a 
performance perspective, and our implementations of send() and recieve() 
shouldn't have any concurrency problems that need to be worked around 
with a lock. So, I vote to remove these, unless there is something else 
I'm missing?

Regards

Bryce.




More information about the Java-patches mailing list