RxSwift icon indicating copy to clipboard operation
RxSwift copied to clipboard

fixes stack overflow possibility with merge operators

Open geoffmacd opened this issue 1 year ago • 2 comments
trafficstars

Fixes https://github.com/ReactiveX/RxSwift/issues/2615 See issue for details

when completing Merge operator iterations (concat(), concatMap() and merge(maxConcurrent:), fixes subscribing immediately to the next in the queue, which can produce values immediately which can re-enter and cause stack overflows. ultimately uses CurrentThreadScheduler and the isScheduleRequired prop to know if it needs to schedule or not. This is similar to Producer.

All tests pass

geoffmacd avatar Jul 26 '24 23:07 geoffmacd

This looks like a good candidate for a dot release @freak4pc. What do you think?

danielt1263 avatar Jul 27 '24 00:07 danielt1263

Hey @geoffmacd, sorry for the long delay on this.

  1. Did you use your own fix in prod by now? Is it stable?
  2. Is the code ready from your perspective ?
  3. Let's rebase / merge with main and have CI run all the tests to make sure we're good.

Thanks!

freak4pc avatar Oct 03 '24 12:10 freak4pc

Hey @freak4pc

Sorry for delay.

  1. Yes this has been integrated in dropbox for 6 months which heavily uses Rx and is stable.
  2. yes.
  3. Will do.

geoffmacd avatar Feb 11 '25 02:02 geoffmacd

Much appreciated, thank you :)

freak4pc avatar Feb 11 '25 09:02 freak4pc

ok, updated from main. ready to merge

geoffmacd avatar Feb 14 '25 01:02 geoffmacd