Conform AsyncSequence
by Shared
#3202
Replies: 1 comment 5 replies
-
Hi @larryonoff, I don't think we'd make -for await _ in currentUser.publisher.values {
+for await _ in currentUser.sequence { Also, this effect can actually be written much shorter for the publisher style: case .onAppear:
return .publisher {
state.$currentUser.publisher
.map(.currentUserUpdated)
} Because the trailing closure of And finally, the publisher interface was specifically chosen because of its guarantees of synchronous delivery of values, which |
Beta Was this translation helpful? Give feedback.
-
I believe it would be a convenient improvement to the
Shared
type if it could conform toAsyncSequence
. This enhancement would allow for the use of for-await-in without the need forCombine
.instead of
Beta Was this translation helpful? Give feedback.
All reactions