RxSwift icon indicating copy to clipboard operation
RxSwift copied to clipboard

fixes stack overflow possibility with merge operators

Open geoffmacd opened this issue 7 months ago • 2 comments

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