-
Notifications
You must be signed in to change notification settings - Fork 31
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
Crash when using Combine Publisher as AsyncSequence #123
Comments
Hi, thanks for reporting this! |
@rickclephas It's part of a fairly big project. Let me see if I can put together a small demo to reproduce the issue. It might take me a few days.
In the View,
When the view loads up, I pick a race from the dropdown, and everything works for a period of time. Usually a few seconds, sometimes a minute or so. And then I get the crash/error. I don't have to select a different race or anything. |
@rickclephas it's also worth noting ... the Kotlin Flow ( |
Hi @Bradleycorn thanks for the additional details. Unfortunately I wasn't able to reproduce the issue. |
@rickclephas Sorry, I got sidetracked on some things. I will try to get a demo project together asap. |
@rickclephas I have created a demo project. You can find it here: To reproduce the issue, Build and run the included iOS App (I've been using a Simulator on iOS 16.4). |
…sher-demand Support Combine Publisher back pressure
@Bradleycorn thanks again for reporting this and providing the demo project. |
Thanks @rickclephas ! |
FYI the fix has been released in v1.0.0-ALPHA-15. |
I'm using version: 1.0.0-ALPHA-6
I have a Publisher, and I'm converting to an AsyncSequence like this:
In the above,
$selectedRace
is the publisher for an@Published
property in an@ObservableObject
.When the published property's value changes, I need to call my Repo with the new value (which returns a Flow) to get a stream of updated data.
When the above code runs, it works briefly (I get "Got more runners" a few times in the console output), but after a few seconds, it crashes. It seems to fail in
NativeFlowSubscription
, on line 49 of Publisher.swift (see screenshot below).FWIW, in other areas of my app, I use an AsyncSequence with the same kotlin call (
asyncSequence(for: self.trackRepo.getRunners(id: raceId))
and it works fine.The text was updated successfully, but these errors were encountered: