You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@tomcat.apache.org by fh...@apache.org on 2008/02/26 19:10:18 UTC

svn commit: r631315 - /tomcat/trunk/java/org/apache/catalina/tribes/transport/nio/NioReplicationTask.java

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: dev-unsubscribe@tomcat.apache.org
For additional commands, e-mail: dev-help@tomcat.apache.org