You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Hi, I haven't found any discussion forum about RxRuby, this is more about how to adapt it for my use case, and not an issue with the library itself. Feel free to redirect me to the correct forum if existing, and I'll gladly re-submit this discussion.
I've been looking into #82, and I've seen that it's possible to pass a custom executor through observe_on call (I haven't found documentation about it, however). I have this use case in which I open custom network clients in a batch like scenario, where my current "baby-executor" caps the number of concurrently open connections. This means that further elements of the collection will have to wait for the connection to be open, all callbacks to be run and the connection to be closed, before proceeding with the consumption.
Is there an example of such a Reactive Observable in the wild, or can you provide documentation about it? My concern is that, everytime I call an operation on the collection, my current implementations reopen connections, i.e. I can't seem to keep the connections open until the end of the observable evaluation:
hosts=%w(host1host2...)collection=MyCustomObservable.new(hosts)# exposes an ssh connection# I want that both the #select call as the on_next observer callback run # within the same network transaction, instead of # open/evaluate select/close/open/on_next/close againcollection=collection.select(&:ipindesiredregion)collection.subscribe(->(conn){conn.exec!("weird command")} ...
# trigger?collection.run!
The text was updated successfully, but these errors were encountered:
I tried with the CurrentThreadScheduler.instance, and the hosts are instantiated sequentially (as expected). Now, in that scheduler of mine, I'm missing how do to proper schedule the tasks.
module MyScheduler < Rx::LocalScheduler # ?
# where is the documentation?
def schedule_recursive_with_state(state, action) # is this the proper callback to overwrite
# what is the state? what is the action?
# more important, how do pass each enumerable item to a separate object???
...
end
Hi, I haven't found any discussion forum about RxRuby, this is more about how to adapt it for my use case, and not an issue with the library itself. Feel free to redirect me to the correct forum if existing, and I'll gladly re-submit this discussion.
I've been looking into #82, and I've seen that it's possible to pass a custom executor through observe_on call (I haven't found documentation about it, however). I have this use case in which I open custom network clients in a batch like scenario, where my current "baby-executor" caps the number of concurrently open connections. This means that further elements of the collection will have to wait for the connection to be open, all callbacks to be run and the connection to be closed, before proceeding with the consumption.
Is there an example of such a Reactive Observable in the wild, or can you provide documentation about it? My concern is that, everytime I call an operation on the collection, my current implementations reopen connections, i.e. I can't seem to keep the connections open until the end of the observable evaluation:
The text was updated successfully, but these errors were encountered: