Hacker Newsnew | past | comments | ask | show | jobs | submitlogin

What would AsyncObservable look like in JS?


It would be like an Observable, where the Observer's next/error/complete are changed from X=>() to X=>Promise where the Promise indicates the Observer is done with the consumption, telling the producer that it can continue producing more values.


If the producer is ready to produce one/more values prior to the Observer's being ready to consume them, do those values go into a queue?

If there is more than one Observer of the same AsyncObservable, is there a separate queue for each of them?

I'm thinking of AsyncSink[1] used by AsyncIterableX[2] (both of IxJS[3]) and how they might be conceptually related to implementations of AsyncObservable.

[1] https://github.com/ReactiveX/IxJS/blob/master/src/asyncsink....

[2] https://github.com/ReactiveX/IxJS/blob/master/src/asyncitera...

[3] https://github.com/ReactiveX/IxJS




Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact

Search: