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

Fix event loop binding #727

Open
wants to merge 1 commit into
base: master
Choose a base branch
from

Conversation

x42005e1f
Copy link
Contributor

@x42005e1f x42005e1f commented Dec 25, 2024

What do these changes do?

In a multithreaded environment, it is possible that nowait methods may be called in event loops other than the one in which asynchronous methods are called. As a result, simultaneous binding to two different event loops is possible, because of which some methods will not work. This PR fixes this bug and ensures that RuntimeError is safely raised.

Side effect: nowait methods no longer depend on the event loop (and do not raise a RuntimeError when used from a different event loop).

Are there changes in behavior for the user?

There are no behavior changes for users.

Copy link

codspeed-hq bot commented Dec 25, 2024

CodSpeed Performance Report

Merging #727 will not alter performance

Comparing x42005e1f:fix-event-loop-binding (dff6070) with master (8ab8405)

Summary

✅ 4 untouched benchmarks

Copy link

codecov bot commented Dec 25, 2024

Codecov Report

All modified and coverable lines are covered by tests ✅

Project coverage is 95.40%. Comparing base (8ab8405) to head (dff6070).

Additional details and impacted files
@@            Coverage Diff             @@
##           master     #727      +/-   ##
==========================================
- Coverage   95.40%   95.40%   -0.01%     
==========================================
  Files           5        5              
  Lines        1721     1719       -2     
  Branches      154      154              
==========================================
- Hits         1642     1640       -2     
  Misses         52       52              
  Partials       27       27              

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

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.

1 participant