amplify-swift
amplify-swift copied to clipboard
Revises AsyncChannel to conform to behavior of Apple's implementation
Issue #, if available:
Description of changes:
Task cancellation must be handled on the send and next sides of the channel. The send should also suspend until a next continuation is matched to it. This causes back pressure. Tests pass on macOS but fail with iOS which also happens with the unit tests in Apple's package. The way these tests work will have to be revised due to difficulties with unit testing Swift Concurrency.
Check points: (check or cross out if not relevant)
- [ ] Added new tests to cover change, if needed
- [ ] Build succeeds with all target using Swift Package Manager
- [ ] All unit tests pass
- [ ] All integration tests pass
- [ ] Security oriented best practices and standards are followed (e.g. using input sanitization, principle of least privilege, etc)
- [ ] Documentation update for the change if required
- [ ] PR title conforms to conventional commit style
- [ ] If breaking change, documentation/changelog update with migration instructions
By submitting this pull request, I confirm that my contribution is made under the terms of the Apache 2.0 license.