Skip to content

Support handing off coroutines between Trio and other runners - #732

Merged
njsmith merged 5 commits into
python-trio:masterfrom
njsmith:detach-coroutine
Oct 16, 2018
Merged

njsmith merged 5 commits into
python-trio:masterfrom
njsmith:detach-coroutine

Conversation

@njsmith

@njsmith njsmith commented Oct 13, 2018

Copy link
Copy Markdown
Member

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

codecov Bot commented Oct 14, 2018 •

Copy link
Copy Markdown

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.

@oremanj oremanj left a comment

Copy link
Copy Markdown
Member

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.

Comment thread trio/_core/tests/test_run.py
Comment thread trio/_core/_traps.py
@njsmith

njsmith commented Oct 16, 2018

Copy link
Copy Markdown
Member Author

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.

2 participants