qpid-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From ai...@apache.org
Subject svn commit: r816612 - /qpid/branches/java-network-refactor/qpid/java/client/src/main/java/org/apache/qpid/client/protocol/AMQProtocolHandler.java
Date Fri, 18 Sep 2009 12:54:23 GMT
Author: aidan
Date: Fri Sep 18 12:54:23 2009
New Revision: 816612

URL: http://svn.apache.org/viewvc?rev=816612&view=rev
Log:
QPID-2104 AMQProtocolHandler: hand the actual write off to a seperate thread

Modified:
    qpid/branches/java-network-refactor/qpid/java/client/src/main/java/org/apache/qpid/client/protocol/AMQProtocolHandler.java

Modified: qpid/branches/java-network-refactor/qpid/java/client/src/main/java/org/apache/qpid/client/protocol/AMQProtocolHandler.java
URL: http://svn.apache.org/viewvc/qpid/branches/java-network-refactor/qpid/java/client/src/main/java/org/apache/qpid/client/protocol/AMQProtocolHandler.java?rev=816612&r1=816611&r2=816612&view=diff
==============================================================================
--- qpid/branches/java-network-refactor/qpid/java/client/src/main/java/org/apache/qpid/client/protocol/AMQProtocolHandler.java
(original)
+++ qpid/branches/java-network-refactor/qpid/java/client/src/main/java/org/apache/qpid/client/protocol/AMQProtocolHandler.java
Fri Sep 18 12:54:23 2009
@@ -564,9 +564,16 @@
 
     public void writeFrame(AMQDataBlock frame, boolean wait)
     {
-        ByteBuffer buf = frame.toNioByteBuffer();
+        final ByteBuffer buf = frame.toNioByteBuffer();
         _writtenBytes += buf.remaining();
-        _networkDriver.send(buf);
+        Job.fireAsynchEvent(_poolReference.getPool(), _writeJob, new Runnable()
+        {
+            @Override
+            public void run()
+            {
+                _networkDriver.send(buf);
+            }
+        });
         if (PROTOCOL_DEBUG)
         {
             _protocolLogger.debug(String.format("SEND: [%s] %s", this, frame));



---------------------------------------------------------------------
Apache Qpid - AMQP Messaging Implementation
Project:      http://qpid.apache.org
Use/Interact: mailto:commits-subscribe@qpid.apache.org


Mime
View raw message