title: Swift Combine: handle async at subscription level or receive level?
body: <p>I wish to observe an ongoing series of values, and process each value as it is received. The act of handling the value may cause a new value to be generated and posted. This is the cause of reentrancy problems.</p>
  <p>The original code was written in <code>RxSwift</code> and the reentrancy problem was dealt with by the use of an async scheduler:</p>
  <pre><code>eventSubject
      .asObservable()
      .observeOn(MainScheduler.asyncInstance)
      .subscribe(onNext: { [weak self] event in
          self?.handleEvent(event)
      })
      .disposed(by: disposeBag)
  </code></pre>
  <p>I would like to do the same with <code>Combine</code>, but am confused as to my options.</p>
  <pre><code>enum Event { case foo, bar, baz }
  
  @Published var eventFlow: Event = .foo
  
  ...
  
  $eventFlow
      .receive(on: RunLoop.main)
      .sink { [weak self] event in
          DispatchQueue.main.async { [weak self] in
              self?.handleEvent(event)
          }
      }
      .store(in: &amp;cancelBag)
  </code></pre>
  <p>Q. is this a valid approach? Is the '<code>receive(on: RunLoop.main)</code>' required?</p>
  <p>And/or should I be subscribing on a queue, such as <code>DispatchQueue.global()</code>, and foregoing the <code>DispatchQueue.main.async</code> call?</p>
  <p>Any suggestions are welcome.</p>