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

AsyncThrowingStream instead of custom type #204

Open
wants to merge 1 commit into
base: master
Choose a base branch
from

Conversation

doozMen
Copy link

@doozMen doozMen commented Feb 27, 2025

I had a look at your super library and it solved many issues compared to Skie. I had some trouble understanding the asyncSequence as I did not understand why AsyncThrowingStream could not be used directly. So I tried and came up with this solution that at least to me is simpler. Would you consider merging it?

It removes the need for the custom type NativeFlowAsyncSequence in favor or the AsyncThrowingStream so this would be breaking. But it keeps the use in a for try await in ... loop so I did not have to alter the tests for them to work.

I added a lock although I think you can debate as the closure of AsyncThrowingStream is in Swifts structured concurrency that it is safe to remove it. It does not harm the structured concurrency so I kept it as I do not know if it is needed for the Kotlin part.

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.

1 participant