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

Hide H2Connection inside _LockedObject #3318

Merged
merged 1 commit into from
Jan 25, 2024
Merged

Conversation

pquentin
Copy link
Member

This trick was used in the hyper HTTP/2 client, and has two advantages:

  1. it is impossible to use the connection without acquiring the lock
  2. passing the connection to another object only requires one parameter

This pull request was sponsored by Elastic, my employer.

This trick was used in the hyper HTTP/2 client, and has two advantages:

 1. it is impossible to use the connection without acquiring the lock
 2. passing the connection to another object only requires one parameter
@pquentin pquentin added the Skip Changelog Pull requests that don't require a changelog entry label Jan 25, 2024
Copy link
Member

@sethmlarson sethmlarson left a comment

Choose a reason for hiding this comment

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

LGTM!

@pquentin pquentin merged commit 8c8e26d into urllib3:main Jan 25, 2024
31 of 34 checks passed
@pquentin pquentin deleted the locked-object branch January 25, 2024 13:39
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Skip Changelog Pull requests that don't require a changelog entry
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants