On 10 Oct 2011, at 23:36, Christopher Schultz
<ch...@christopherschultz.net> wrote:

> -----BEGIN PGP SIGNED MESSAGE-----
> Hash: SHA1
>
> Pid,
>
> On 10/10/2011 2:28 PM, Pid wrote:
>> On 10/10/2011 10:30, sasc sasc wrote:
>>> +1 for this enhancement. With configurable number of threads
>>> (default: Runtime.getRuntime().availableProcessors())
>>
>> Such a change might prove unwelcome for people who've got (however
>> fragile) configurations which rely on apps starting in a specific
>> order.
>>
>> For Tomcat 7.0 I'd suggest that the default remain 1.
>
> I would say that the default should probably that the main thread
> directly initializes everything, instead of launching a new thread
> pool of size=1 and then sitting there waiting for it to finish.
>
> Practically speaking, it may be easier to just do the above (use a
> 1-sized pool) in order to avoid terrible-looking and hard-to-follow
> code. An idle thread isn't really that much strain on a system.
>
> It might be nice to have Tomcat auto-detect the number of processors
> and then subtract from them, say, with a negative number. So, "-2"
> means "number of processors minus two" with the obvious caveat that
> you always need to have at least one :)
>
> So, maybe "0" could mean "use all processors", positive integers mean

If we're talking about a thread pool, 0 should mean 'no extra threads'
ie runs in the main thread, so I agree with your first point above:
default 0.

> "limit to X number", and negative integers mean "all available
> processors minus X".

My first instinct was to say "that's crazy, fool!" but I'm starting to like it.


p

> - -chris
> -----BEGIN PGP SIGNATURE-----
> Version: GnuPG v1.4.10 (MingW32)
> Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org/
>
> iEYEARECAAYFAk6TVzEACgkQ9CaO5/Lv0PCHcgCeM7ZCq7IMo0pOEXvMpeVXpsG6
> UVYAnRn2GyEufIcPtjhRkcxPuN5QL3Zi
> =/kM+
> -----END PGP SIGNATURE-----
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org
> For additional commands, e-mail: users-h...@tomcat.apache.org
>

---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org
For additional commands, e-mail: users-h...@tomcat.apache.org

Reply via email to