Hi Tim and Tal,

 

The internal HTTP connectors can have their thread pool configured using
parameters, like the Jetty connector. Also, the default value for maxThreads
is now 10 instead of 255.

 

Best regards,
Jerome Louvel
--
Restlet ~ Founder and Technical Lead ~  <http://www.restlet.org/>
http://www.restlet.org
Noelios Technologies ~  <http://www.noelios.com/> http://www.noelios.com

 

 

 

De : [email protected] [mailto:[email protected]] De la part de Tim
Peierls
Envoyé : vendredi 25 juin 2010 23:22
À : [email protected]
Objet : Re: ClientResource leaves inactive thread

 

On Thu, Jun 24, 2010 at 10:32 PM, Tal Liron <[email protected]>
wrote:

I might be overstepping the boundedness of this topic (get it?) 

 

*groan*

 

but I think users should be able to configure the size of various thread
pools that Restlet uses.

 

I agree, with a caveat. Threads are a globally shared resource, not just
within a JVM, but potentially across the whole OS, depending on how JVM
threads are mapped to system threads. One poorly configured thread pool
under heavy use can affect the entire machine. The Restlet framework can't
know in general the full context in which it will be used, so its defaults
should be conservative, but it should allow users to change the
configuration to take into account better knowledge of the full context.

 

The caveat is that people don't always understand how to use the
configuration parameters of ThreadPoolExecutor. There was an exchange on the
concurrency-interest mailing list recently that brought this home to me. For
example, it seems that a lot of people think of corePoolSize as minPoolSize,
the opposite of maxPoolSize, which is the wrong way to think about it. A
conservative default in Restlet is probably better than a user configuration
based on a misunderstanding.

 

--tim

------------------------------------------------------
http://restlet.tigris.org/ds/viewMessage.do?dsForumId=4447&dsMessageId=2628676

Reply via email to