Skip to content

Allow configuration of Netty NIO boss executor#7

Closed
trask wants to merge 1 commit into
AsyncHttpClient:masterfrom
trask:master
Closed

Allow configuration of Netty NIO boss executor#7
trask wants to merge 1 commit into
AsyncHttpClient:masterfrom
trask:master

Conversation

@trask

@trask trask commented Apr 10, 2011

Copy link
Copy Markdown
Contributor

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.

@jfarcand

Copy link
Copy Markdown
Contributor

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

@jfarcand jfarcand closed this Apr 11, 2011
@trask

trask commented Apr 13, 2011

Copy link
Copy Markdown
Contributor Author

Great, thank you.

@astubbs

astubbs commented Apr 18, 2012

Copy link
Copy Markdown

trask, was this so that you could get netty to use threads from your own thread pool? like an Akka dispatcher?

@jfarcand

Copy link
Copy Markdown
Contributor

@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

astubbs commented Apr 18, 2012

Copy link
Copy Markdown

Cool. Problem is, I can't see how to get a java.util.concurrent.ExecutorService out of an Akka dispatcher..

cs-workco pushed a commit to cs-workco/async-http-client that referenced this pull request Apr 13, 2023
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
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants