Return-Path: Delivered-To: apmail-directory-dev-archive@www.apache.org Received: (qmail 18029 invoked from network); 7 Oct 2005 05:53:53 -0000 Received: from hermes.apache.org (HELO mail.apache.org) (209.237.227.199) by minotaur.apache.org with SMTP; 7 Oct 2005 05:53:53 -0000 Received: (qmail 97374 invoked by uid 500); 7 Oct 2005 05:53:52 -0000 Delivered-To: apmail-directory-dev-archive@directory.apache.org Received: (qmail 97322 invoked by uid 500); 7 Oct 2005 05:53:52 -0000 Mailing-List: contact dev-help@directory.apache.org; run by ezmlm Precedence: bulk List-Help: List-Unsubscribe: List-Post: List-Id: Reply-To: "Apache Directory Developers List" Delivered-To: mailing list dev@directory.apache.org Received: (qmail 97311 invoked by uid 99); 7 Oct 2005 05:53:52 -0000 Received: from asf.osuosl.org (HELO asf.osuosl.org) (140.211.166.49) by apache.org (qpsmtpd/0.29) with ESMTP; Thu, 06 Oct 2005 22:53:52 -0700 X-ASF-Spam-Status: No, hits=0.0 required=10.0 tests= X-Spam-Check-By: apache.org Received-SPF: neutral (asf.osuosl.org: local policy) Received: from [212.190.80.118] (HELO smtp.dns.be) (212.190.80.118) by apache.org (qpsmtpd/0.29) with ESMTP; Thu, 06 Oct 2005 22:53:55 -0700 Received: from localhost (smtp-new.dns.be [127.0.0.1]) by smtp.dns.be (Postfix) with ESMTP id 30C6E1262DA for ; Fri, 7 Oct 2005 07:53:25 +0200 (CEST) Received: from smtp.dns.be ([127.0.0.1]) by localhost (smtp.dns.be [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id 30189-09 for ; Fri, 7 Oct 2005 07:53:22 +0200 (CEST) Received: from [192.168.192.9] (mortimer.dns.be [192.168.192.9]) by smtp.dns.be (Postfix) with ESMTP id F0DF11262D1 for ; Fri, 7 Oct 2005 07:53:22 +0200 (CEST) Message-ID: <43460D52.2020703@pandora.be> Date: Fri, 07 Oct 2005 07:53:22 +0200 From: Maarten Bosteels User-Agent: Mozilla Thunderbird 1.0.2-1.4.1.centos4 (X11/20050323) X-Accept-Language: en-us, en MIME-Version: 1.0 To: Apache Directory Developers List Subject: Re: [MINA] Some Questions References: <768dcb2e0510061910n6c819e83k@mail.gmail.com> In-Reply-To: <768dcb2e0510061910n6c819e83k@mail.gmail.com> Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit X-Virus-Scanned: amavisd-new at dns.be X-Virus-Checked: Checked by ClamAV on apache.org X-Spam-Rating: minotaur.apache.org 1.6.2 0/1000/N Trustin Lee wrote: > 3) While trying to understand (2) I noticed the following > code in SimpleServiceRegistry: > >219 private void startThreadPools() > >220 { > >221 if( !services.isEmpty() ) > >222 return; > >223 > >224 ioThreadPoolFilter.start(); > >225 protocolThreadPoolFilter.start(); > >226 } > > Is this correct? You only start the thread pools when there are no > services? Looks odd. > > It is correct because startThreadPools() is invoked whenever bind() is > called(). Thread pools should be started only when it is the first bind. I also happened to browse this code yesterday, and I was also wondering whether this was correct. I figured the examples wouldn't work if it wasn't. But maybe some comment in the code might clarify it for anyone quickly reading through the code. Just a very minor enhancement. Maarten