|
Home > Archive > Apache Directory Project > October 2005 > [MINA] Some Questions
You are viewing an archived Text-only version of the thread.
To view this thread in it's original format and/or if you want to reply to
this thread please [click here]
| Author |
[MINA] Some Questions
|
|
|
|
|
|
| Maarten Bosteels 2005-10-07, 2:45 am |
| 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
| |
| Trustin Lee 2005-10-07, 7:45 am |
| Hi Maarten,
2005/10/7, Maarten Bosteels <m.bosteels-LPO8gxj9N8aZIoH1IeqzKA@public.gmane.org>:
>
> 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.
I added some comments as you advised. Thanks!
Trustin
--
what we call human nature is actually human habit
--
http://gleamynode.net/
|
|
|
|
|