Skip to content

Allow configuration of Netty NIO boss executor #7

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Closed
wants to merge 1 commit into from
Closed

Allow configuration of Netty NIO boss executor #7

wants to merge 1 commit into from

Conversation

trask
Copy link
Contributor

@trask trask commented Apr 10, 2011

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
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
Copy link
Contributor Author

trask commented Apr 13, 2011

Great, thank you.

@astubbs
Copy link

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
Copy link
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
Copy link

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..

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