Skip to content
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

Investigate different thread allocation semantics under the hood #190

Open
farmdawgnation opened this issue Mar 7, 2018 · 0 comments
Open

Comments

@farmdawgnation
Copy link
Member

It's been reported that every time an Http is constructed, we get 2*$numCpus threads created by AHC because we create an AHC client on each invocation. Some things to look at:

  • One option that's been suggested is to share an AHC client instance under the hood, which is thread-safe "with qualification" - specifically so long as you don't do anything not-thread-safe in your callbacks. The with qualification bit is what scares me about that.
  • Perhaps a more targeted approach is to expose or better document a knob for the number of threads that we should allocate when we build the client.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Development

No branches or pull requests

1 participant