Closed gizmomogwai closed 6 years ago
thanks for request😃
The merge overload and groupBy are missing in rx. I will think how to implement it.
Are you using fswatch package? It might be enough to use this.
To make an own Obsevable and publish value, examples around here may be helpful. https://github.com/lempiji/rx/blob/master/examples/http-client/source/app.d
Thanks for the pointer to the http-client app. I looked also a little into the java rx implementation which looks rather complicated for all the merge overloads ... actually my usecase would need an overload for a stream of observables as well. merge at the moment only has an overload for two observables?
Yes. I only implement what merges two Observables.
I thought about an easy implementation for streamed Observables. Create a Subject, make grouped source Observables, subscribe to source and redirect to the Subject.
Perhaps the merge will also be this way. I will try on the weekend.
I implemented groupBy. Merge for streams too. I also wrote an example, is it as expected?
your a genius! this looks great! i will give it a try!!!
Sorry about the wrong comments (i deleted them) ... works flawless !!! Thanks a lot!
😃
Hi ... I really like rx for dlang :) I want to use it in a filewatcher program to debounce events from the filesystem. Problem is, that the low-level api produces several events for a write on a file, that i want not directly published to the application. This can easily be done with e.g. rxjava by doing something like this: https://stackoverflow.com/a/43431636/204070
merge( source.groupBy(value -> value.objectId) .map(observable -> observable.debounce(1, TimeUnit.SECONDS)) )
unfortunately i do not know enough (yet) of rx for dlang to implement my own groupBy ...