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

[wip] Sketch of how shared tasks might work #303

Open
wants to merge 2 commits into
base: main
Choose a base branch
from

Conversation

njsmith
Copy link
Member

@njsmith njsmith commented Aug 21, 2017

See gh-266

This is surprisingly interesting and tricky.

See python-triogh-266

This is surprisingly interesting and tricky.
@codecov
Copy link

codecov bot commented Aug 22, 2017

Codecov Report

Merging #303 (360855d) into master (1c15500) will decrease coverage by 0.37%.
The diff coverage is 0.00%.

Additional details and impacted files
@@            Coverage Diff             @@
##           master     #303      +/-   ##
==========================================
- Coverage   98.94%   98.58%   -0.37%     
==========================================
  Files         113      114       +1     
  Lines       16919    16982      +63     
  Branches     3050     3064      +14     
==========================================
  Hits        16741    16741              
- Misses        123      186      +63     
  Partials       55       55              
Files Changed Coverage Δ
trio/_shared_task.py 0.00% <0.00%> (ø)

@njsmith
Copy link
Member Author

njsmith commented Sep 2, 2018

One issue with this as currently written is that it uses outcome.unwrap() multiple times, which of course doesn't work.

We could mess around somehow trying to copy exceptions, but maybe it's better to do something simpler: if there's an error in a shared task, do raise SharedTaskError from <actual exception>. It's fine for multiple exceptions to have __cause__ pointing to the same object, because __cause__ doesn't get mutated.

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