Skip to content

Propagate cancellation while AsyncSequence next is suspended - #263

Open
dajiaohuang wants to merge 1 commit into
rickclephas:masterfrom
dajiaohuang:fix-async-sequence-cancellation
Open

dajiaohuang wants to merge 1 commit into
rickclephas:masterfrom
dajiaohuang:fix-async-sequence-cancellation

Conversation

@dajiaohuang

Copy link
Copy Markdown

Summary

  • Propagate task cancellation to a suspended next() as CancellationError.
  • Add a MainActor-synchronized test that cancels only after the iterator has requested its first value and suspended.

Validation

  • git diff --check passed.
  • The targeted Swift test has not run locally: this Windows environment has no Swift toolchain or Xcode. Swift validation is left to CI.

Relation to #260

#260 concerns Gradle generated-source-directory cache relocatability and is closed with a fix noted in v1.0.6. The v1.0.6 Swift AsyncSequence cancellation path matches current master; this PR addresses that independent behavior and does not claim to close #260.

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.

generatedSourceDir compiler plugin option uses an absolute path, breaking build cache relocatability

1 participant