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

Support handing off coroutines between Trio and other runners #732

Merged
merged 5 commits into from Oct 16, 2018

Conversation

njsmith
Copy link
Member

@njsmith njsmith commented Oct 13, 2018

I'm not sure if this is a good idea, but I guess we'll give it a try
and see how it goes.

Closes gh-649.

@codecov
Copy link

codecov bot commented Oct 14, 2018

Codecov Report

Merging #732 into master will increase coverage by <.01%.
The diff coverage is 100%.

Impacted file tree graph

@@            Coverage Diff             @@
##           master     #732      +/-   ##
==========================================
+ Coverage   99.31%   99.32%   +<.01%     
==========================================
  Files          96       96              
  Lines       11464    11562      +98     
  Branches      820      824       +4     
==========================================
+ Hits        11386    11484      +98     
  Misses         58       58              
  Partials       20       20
Impacted Files Coverage Δ
trio/hazmat.py 100% <ø> (ø) ⬆️
trio/_core/tests/test_run.py 100% <100%> (ø) ⬆️
trio/_core/_traps.py 100% <100%> (ø) ⬆️
trio/_core/__init__.py 100% <100%> (ø) ⬆️
trio/_core/_run.py 99.7% <100%> (ø) ⬆️

Continue to review full report at Codecov.

Legend - Click here to learn more
Δ = absolute <relative> (impact), ø = not affected, ? = missing data
Powered by Codecov. Last update cffb536...c503b2e. Read the comment docs.

Copy link
Member

@oremanj oremanj left a comment

Choose a reason for hiding this comment

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

Clever! I appreciate that this can be done with such a minimal change to the run loop.

trio/_core/tests/test_run.py Show resolved Hide resolved
trio/_core/_traps.py Show resolved Hide resolved
@njsmith
Copy link
Member Author

njsmith commented Oct 16, 2018

Guess I'll go ahead and merge this then. The real test will be to see how well it works in trio-asyncio...

@njsmith njsmith merged commit 6d1f968 into python-trio:master Oct 16, 2018
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.

None yet

2 participants