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

Catch panics in tasks and convert to rejections #813

Merged
merged 8 commits into from
Oct 28, 2021

Conversation

kjvalencik
Copy link
Member

This PR builds on #808 and applies similar logic to tasks that use promises.

It also makes changes to match the latest neon-bindings/rfcs#35:

  • Deferred::settle_with is removed. Manually resolving a Deferred is considered low level. Adding a helper is unnecessary.
  • Move Channel::settle_with to Deferred::settle_with. Now that there is room on Deferred, it reads more clearly here.
  • Tasks get owned contexts

@kjvalencik kjvalencik marked this pull request as draft October 13, 2021 14:54
@kjvalencik
Copy link
Member Author

kjvalencik commented Oct 13, 2021

The changes aren't quite as intimidating when excluding tests. 498 additions, 334 deletions and about half of those are moving lines from one file to another.

@kjvalencik kjvalencik marked this pull request as ready for review October 22, 2021 16:51
@kjvalencik kjvalencik requested a review from dherman October 22, 2021 16:51
Copy link
Collaborator

@dherman dherman left a comment

Choose a reason for hiding this comment

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

Looks good! Just a few suggestions for clarity.

Copy link
Collaborator

@dherman dherman left a comment

Choose a reason for hiding this comment

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

Looks great!

@kjvalencik kjvalencik merged commit 5985f35 into next/0.10 Oct 28, 2021
@kjvalencik kjvalencik deleted the kv/task-api-fixes branch October 28, 2021 13:42
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