[ 
https://issues.apache.org/jira/browse/HTTPCORE-86?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel#action_12516514
 ] 

Andrea Selva commented on HTTPCORE-86:
--------------------------------------

Why not using original Doug Lea's concurrent package with this small static 
method inspired by 
http://mail-archives.apache.org/mod_mbox/geronimo-dev/200407.mbox/[EMAIL 
PROTECTED]


public static PooledExecutor newFixedThreadPool(int numTh) {
    PooledExecutor fixedExecutor = new PooledExecutor(new LinkedQueue());
    fixedExecutor.setKeepAliveTime(0L);
    fixedExecutor.setMaximumPoolSize(int numTh);
    fixedExecutor.setMinimumPoolSize(int numTh);

    return fixedExecutor;
}

I hope this could help
 Andrea


PS
 The price to pay is to add a library depedency, alternatively from Lea's 
concurrent packages should me taken only the necessary classes

> Provide mechanism to re-start I/O worker threads terminated due to a runtime 
> exception
> --------------------------------------------------------------------------------------
>
>                 Key: HTTPCORE-86
>                 URL: https://issues.apache.org/jira/browse/HTTPCORE-86
>             Project: HttpComponents Core
>          Issue Type: Improvement
>          Components: HttpCore NIO
>            Reporter: Oleg Kalnichevski
>             Fix For: 4.0-beta1
>
>
> Provide mechanism to re-start I/O worker threads terminated due to a runtime 
> exception.

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.


---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]

Reply via email to