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(async): abortableAsyncIterable() should call .return() on the generator once aborted #5560

Merged
merged 4 commits into from
Aug 1, 2024

Conversation

raaymax
Copy link
Contributor

@raaymax raaymax commented Jul 27, 2024

Fixes #3518

@raaymax raaymax requested a review from kt3k as a code owner July 27, 2024 10:07
@CLAassistant
Copy link

CLAassistant commented Jul 27, 2024

CLA assistant check
All committers have signed the CLA.

@github-actions github-actions bot added the async label Jul 27, 2024
Copy link

codecov bot commented Jul 27, 2024

Codecov Report

All modified and coverable lines are covered by tests ✅

Project coverage is 96.48%. Comparing base (9253dcb) to head (6df92f7).

Additional details and impacted files
@@           Coverage Diff           @@
##             main    #5560   +/-   ##
=======================================
  Coverage   96.48%   96.48%           
=======================================
  Files         465      465           
  Lines       37759    37764    +5     
  Branches     5579     5580    +1     
=======================================
+ Hits        36432    36437    +5     
  Misses       1285     1285           
  Partials       42       42           

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

@iuioiua iuioiua changed the title fix(async): abortableAsyncIterable() should call .return() on the generator once aborted fix(async): abortableAsyncIterable() should call .return() on the generator once aborted Jul 29, 2024
Copy link
Contributor

@iuioiua iuioiua left a comment

Choose a reason for hiding this comment

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

Apologies for the delay, and thank you for contributing! LGTM.

@iuioiua iuioiua enabled auto-merge (squash) August 1, 2024 00:23
@iuioiua iuioiua merged commit 714fccb into denoland:main Aug 1, 2024
11 checks passed
@raaymax raaymax deleted the abortable-return branch August 1, 2024 10:46
@iuioiua
Copy link
Contributor

iuioiua commented Aug 1, 2024

I realise that return() should be called in a finally block, and throw() should be called in a catch block.

@raaymax
Copy link
Contributor Author

raaymax commented Aug 1, 2024

Ach yes, there is missing part but it's not just that. I created new PR that handles this one.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

abortableAsyncIterable() should call .return() on the generator once aborted
3 participants