Skip to content
Discussion options

You must be logged in to vote

Yes. HTTPX is intended to be thread-safe, and yes, a single client-instance across all threads will do better in terms of connection pooling, than using an instance-per-thread.

We might want to figure a good place in the docs to write about this. (?)

I've not looked through requests or urllib3 to see where they choose to discuss this in their own docs. Their docs choices here might be a useful pointer for us.

(And thank you for the clearly framed question, much appreciated 💚)

Replies: 5 comments 9 replies

Comment options

You must be logged in to vote
4 replies
@pfmoore
Comment options

@ralokt
Comment options

@lovelydinosaur
Comment options

@ralokt
Comment options

Answer selected by lovelydinosaur
Comment options

You must be logged in to vote
3 replies
@lovelydinosaur
Comment options

@lee-cq
Comment options

@lovelydinosaur
Comment options

Comment options

You must be logged in to vote
0 replies
Comment options

You must be logged in to vote
2 replies
@lovelydinosaur
Comment options

@cosven
Comment options

Comment options

You must be logged in to vote
0 replies
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Q&A
Labels
None yet
8 participants