Skip to content

Thread factory provided by the client should be used if not null #1545

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

Merged
merged 2 commits into from
May 8, 2018

Conversation

waleed-dawood
Copy link
Contributor

Thread factory provided by the client should be used if not null, as being done in ChannelManager

@@ -92,7 +92,8 @@ public DefaultAsyncHttpClient(AsyncHttpClientConfig config) {
}

private Timer newNettyTimer(AsyncHttpClientConfig config) {
ThreadFactory threadFactory = new DefaultThreadFactory(config.getThreadPoolName() + "-timer");
ThreadFactory threadFactory = config.getThreadFactory() != null ? config.getThreadFactory() : new DefaultThreadFactory(config.getThreadPoolName());
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Please restore the current behavior for fallback, with "-timer" prefix.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

done

@slandelle slandelle merged commit f723dc6 into AsyncHttpClient:master May 8, 2018
@slandelle slandelle added this to the 2.4.8 milestone May 8, 2018
@slandelle
Copy link
Contributor

Thanks!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants