In an iOS app which generally prefers async/await over Combine, we have this situation.
6 CurrentValueSubject<String,Never>
instances which are being consumed like so:
for await value in Publishers.MergeMany(subjects)
.values {
//... do something with `value`
}
When I throw many values at the subjects in a unit test (concurrently), values are being dropped (the for await only sees a small portion of them). If I change to using sink
, everything works fine. I can do this, but just wondering what the explanation is -- lack of buffering/backpressure in the AsyncPublisher returned by .values
?
Thanks for any insight.