Return-Path: Delivered-To: apmail-jakarta-httpcomponents-dev-archive@www.apache.org Received: (qmail 7636 invoked from network); 23 Jan 2007 21:48:44 -0000 Received: from hermes.apache.org (HELO mail.apache.org) (140.211.11.2) by minotaur.apache.org with SMTP; 23 Jan 2007 21:48:44 -0000 Received: (qmail 4567 invoked by uid 500); 23 Jan 2007 21:48:50 -0000 Delivered-To: apmail-jakarta-httpcomponents-dev-archive@jakarta.apache.org Received: (qmail 4545 invoked by uid 500); 23 Jan 2007 21:48:49 -0000 Mailing-List: contact httpcomponents-dev-help@jakarta.apache.org; run by ezmlm Precedence: bulk List-Help: List-Unsubscribe: List-Post: List-Id: Reply-To: "HttpComponents Project" Delivered-To: mailing list httpcomponents-dev@jakarta.apache.org Received: (qmail 4536 invoked by uid 99); 23 Jan 2007 21:48:49 -0000 Received: from herse.apache.org (HELO herse.apache.org) (140.211.11.133) by apache.org (qpsmtpd/0.29) with ESMTP; Tue, 23 Jan 2007 13:48:49 -0800 X-ASF-Spam-Status: No, hits=2.0 required=10.0 tests=HTML_MESSAGE X-Spam-Check-By: apache.org Received-SPF: neutral (herse.apache.org: local policy) Received: from [63.82.0.117] (HELO IRIS.electric-cloud.com) (63.82.0.117) by apache.org (qpsmtpd/0.29) with ESMTP; Tue, 23 Jan 2007 13:48:41 -0800 X-MimeOLE: Produced By Microsoft Exchange V6.5 MIME-Version: 1.0 Content-Type: multipart/alternative; boundary="----_=_NextPart_001_01C73F38.32D0C72C" x-cr-puzzleid: {6C2E9F54-4BFC-43B9-929E-DDDB5FEE3A2E} x-cr-hashedpuzzle: ABSP A5GW EpUW FNNz GMGd GOW/ GkxI G66S G6+9 HISp H4G7 IYog I+St JkF/ KWq8 KXDr;1;aAB0AHQAcABjAG8AbQBwAG8AbgBlAG4AdABzAC0AZABlAHYAQABqAGEAawBhAHIAdABhAC4AYQBwAGEAYwBoAGUALgBvAHIAZwA=;Sosha1_v1;7;{6C2E9F54-4BFC-43B9-929E-DDDB5FEE3A2E};YQBuAGQAZQByAHMAQABlAGwAZQBjAHQAcgBpAGMALQBjAGwAbwB1AGQALgBjAG8AbQA=;Tue, 23 Jan 2007 21:48:18 GMT;SQBuAHQAZQBuAGQAZQBkACAAdQBzAGEAZwBlACAAbwBmACAARABlAGYAYQB1AGwAdABDAG8AbgBuAGUAYwB0AGkAbgBnAEkATwBSAGUAYQBjAHQAbwByACAAaQBuACAAaAB0AHQAcABjAG8AcgBlAA== Content-class: urn:content-classes:message Subject: Intended usage of DefaultConnectingIOReactor in httpcore Date: Tue, 23 Jan 2007 13:48:18 -0800 Message-ID: <94511A2526233044AC4E4C278B80B3BA386097@IRIS.electric-cloud.com> X-MS-Has-Attach: X-MS-TNEF-Correlator: Thread-Topic: Intended usage of DefaultConnectingIOReactor in httpcore Thread-Index: Acc/ODFSGc9hrtq+R2mjlDJaseDwvw== From: "Anders Wallgren" To: X-Virus-Checked: Checked by ClamAV on apache.org ------_=_NextPart_001_01C73F38.32D0C72C Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: quoted-printable I'm having problems putting DefaultConnectingIOReactor to use. It seems the intended use it to call connect() from another thread, while execute() is (basically), sitting on a select() in some other thread. I say this because the timeout on the select is quite large and there is no way to cause DefaultConnectingIOReactor to wakeup the select call, from what I can see. =20 My experience is that calling register() on the selector while the selector is in a select() call in another thread makes the call to register() block for long periods of time. Usually, the pattern is to queue up the new connections, then call wakeup() on the selector to have it configure the outbound connection. My experience here isn't deep, and largely through trial and error, so I might be completely wrong on this. =20 The sample code in NHttpClient makes a few calls to connect() before calling execute() from the same thread, so this code isn't really a real-world example, it would seem. I've poked through the wiki but haven't found anything relevant to the design of this piece of the code. =20 What am I missing? =20 anders =20 =20 ------_=_NextPart_001_01C73F38.32D0C72C--