Uh oh!
There was an error while loading. Please reload this page.
Allow configuration of Netty NIO boss executor - #7
Conversation
jfarcand
commented
Apr 11, 2011
Hi, I added support for what you wanted using the NettyAsyncHttpProviderConfig element. All you need to do is to described here https://github.com/sonatype/async-http-client/commit/26d4a37b1cbe6c1f5fda8f5d5b01bcc274f99142#L2R30 Thanks! -- Jeanfrancois |
trask
commented
Apr 13, 2011
Great, thank you. |
astubbs
commented
Apr 18, 2012
trask, was this so that you could get netty to use threads from your own thread pool? like an Akka dispatcher? |
jfarcand
commented
Apr 18, 2012
@astubbs That was for allowing configure two threads pools (hence you can use Akka stuff for both): The Netty's boss executor (used by Netty internally) and the applicationThreadPool (which is configurable using the AsyncHttpClientConfig). |
astubbs
commented
Apr 18, 2012
Cool. Problem is, I can't see how to get a java.util.concurrent.ExecutorService out of an Akka dispatcher.. |
motivation: min requirements by sswg changes: * add code of conduct, contributors * add docker setup for ci * add linux docs generation and sanity check scripts * add api documentation generation script
Hi, I couldn't find a way to supply my own ExecutorService instance for this particular thread pool without modifying your library (I wish to use a custom ThreadFactory for it). Initially I thought of adding this as a configuration parameter in AsyncHttpClientConfig, but then realized AsyncHttpClientConfig is not Netty specific and so I decided maybe it wasn't appropriate there and just added an extra constructor in NettyAsyncHttpProvider to handle this. Please let me know if I missed something or if there is another solution you would prefer that I implement. Thanks.