Potential solution for diamond problem/glitches - close but need help! #7530
anthonyjoeseph
started this conversation in
Ideas / Feature request
Replies: 0 comments
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
-
I'm trying to write an operator
batchSync
that behaves like so:Batching "glitches" together (as defined here)
It turns out to be trivial to write a version of that merges cold, synchronous emissions - code:
The underlying idea is that cold subscriptions will block until all of their synchronous emissions have completed.
But I can't seem to make the leap into a full-on
batchSync()
implementationI've tried using
share()
to turn cold observables hot,ReplaySubject
to turn hot observables cold, and thequeueScheduler
to turn recursive subscriptions iterativeI feel like I'm so close. If I can batch synchronous cold emissions, and I can turn synchronous hot emissions into synchronous cold emissions, why can't I batch synchronous hot emissions?
Am I running into a hard boundary of rx/rxjs/javascript that I just can't see?
P.S. I don't want to use the
asapScheduler
or anything like that - I'd like to preserve the synchronous nature of the emissions if possibleBeta Was this translation helpful? Give feedback.
All reactions