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=2626078

