Author: fhanik
Date: Tue Feb 26 10:10:12 2008
New Revision: 631315

URL: http://svn.apache.org/viewvc?rev=631315&view=rev
Log:
no need to sync, the javadoc says it's thread safe

Modified:
    
tomcat/trunk/java/org/apache/catalina/tribes/transport/nio/NioReplicationTask.java

Modified: 
tomcat/trunk/java/org/apache/catalina/tribes/transport/nio/NioReplicationTask.java
URL: 
http://svn.apache.org/viewvc/tomcat/trunk/java/org/apache/catalina/tribes/transport/nio/NioReplicationTask.java?rev=631315&r1=631314&r2=631315&view=diff
==============================================================================
--- 
tomcat/trunk/java/org/apache/catalina/tribes/transport/nio/NioReplicationTask.java
 (original)
+++ 
tomcat/trunk/java/org/apache/catalina/tribes/transport/nio/NioReplicationTask.java
 Tue Feb 26 10:10:12 2008
@@ -308,12 +308,10 @@
             int total = 0;
             if (channel instanceof DatagramChannel) {
                 DatagramChannel dchannel = (DatagramChannel)channel;
-                //were using a shared channel, it's not thread safe
-                //TODO check optimization, one channel per thread
-                synchronized (dchannel) {
-                    while ( total < command.length ) {
-                        total += dchannel.send(buf, udpaddr);
-                    }
+                //were using a shared channel, document says its thread safe
+                //TODO check optimization, one channel per thread?
+                while ( total < command.length ) {
+                    total += dchannel.send(buf, udpaddr);
                 }
             } else {
                 while ( total < command.length ) {



---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]

Reply via email to