Skip to content

Instantly share code, notes, and snippets.

@jasdev
Last active May 23, 2020 21:34
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save jasdev/18aed3f3fe550a262ce3a2823fa40fd1 to your computer and use it in GitHub Desktop.
Save jasdev/18aed3f3fe550a262ce3a2823fa40fd1 to your computer and use it in GitHub Desktop.
Testing zipping with 10k publishers.
import Combine
import CombineExt
var subscriptions = Set<AnyCancellable>()
let publishers = Array(repeating: 1, count: 10_000)
.map { _ in Just(2) }
publishers.zip()
.sink(receiveValue: { _ in })
.store(in: &subscriptions)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment