hc-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From ol...@apache.org
Subject svn commit: r1034593 - /httpcomponents/httpcore/trunk/src/docbkx/nio-ext.xml
Date Fri, 12 Nov 2010 23:02:15 GMT
Author: olegk
Date: Fri Nov 12 23:02:15 2010
New Revision: 1034593

URL: http://svn.apache.org/viewvc?rev=1034593&view=rev
Added a section on I/O interest set operation queuing


Modified: httpcomponents/httpcore/trunk/src/docbkx/nio-ext.xml
URL: http://svn.apache.org/viewvc/httpcomponents/httpcore/trunk/src/docbkx/nio-ext.xml?rev=1034593&r1=1034592&r2=1034593&view=diff
--- httpcomponents/httpcore/trunk/src/docbkx/nio-ext.xml (original)
+++ httpcomponents/httpcore/trunk/src/docbkx/nio-ext.xml Fri Nov 12 23:02:15 2010
@@ -424,6 +424,24 @@ SessionRequest sessionRequest = ioreacto
+        <title>Queuing of I/O interest set operations</title>
+        <para>
+        Several older JRE implementations (primarily from IBM) provide what Java API documentation
+        refers to as a naive implementation of the <classname>java.nio.channels.SelectionKey
+        </classname> class. The problem with <classname>java.nio.channels.SelectionKey
+        </classname> in such JREs is that reading or writing of the I/O interest set
may block 
+        indefinitely if the I/O selector is in the process of executing a select operation.

+        HttpCore NIO can be configured to operate in a special mode wherein I/O interest
+        operations are queued and executed by on the dispatch thread only when the I/O selector
+        not engaged in a select operation.
+        </para>
+        <programlisting><![CDATA[
+HttpParams params = new BasicHttpParams();
+NIOReactorParams.setInterestOpsQueueing(params, true);
+ListeningIOReactor ioreactor = new DefaultListeningIOReactor(2, params);
+    </section>
+    <section>
         <title>I/O reactor exception handling</title>
         Protocol specific exceptions as well as those I/O exceptions thrown in the course

View raw message