Does .Net Reactive Extensions Framework (Rx) takes topological order into consideration?

懵懂的女人 提交于 2020-01-05 02:36:14

问题


Does the .Net Reactive Extensions Framework propagates the notifications in topological order to minimize the amount of updates?

Like Scala Rx does: Does .Net Reactive Extensions (Rx) ta


回答1:


.NET Rx uses several semantics while implementing FRP. The key point are the observables and subscriber contexts, especially the schedulers used by subscribers.

TL;DR - .NET RX does not use topological order while invoking notifications.

The long answer: subscibers are invoked by order of their subscription. In a case of concurrency-aware schedulers you could achive parallel invocation using methods ObserveOn/SubscribeOn (more detailed explanation).

Edit (Thanks to @DaveSexton):

Note that neither ObserveOn nor SubscribeOn achieve "parallel" notifications (unless you are comparing segments of the query on both sides of the operator). Note that neither ObserveOn nor SubscribeOn achieve "parallel" notifications (unless you are comparing segments of the query on both sides of the operator). Rx has a strict contract (§4.2) that prevents overlapping (concurrent) notifications within a single subscription, and for hot observables this contract generally applies across subscriptions as well.




回答2:


Storm.Net (Simple Topologically Ordered Reactive Model) his an attempt to provide a data model that propagates update in a topological order.



来源:https://stackoverflow.com/questions/27064570/does-net-reactive-extensions-framework-rx-takes-topological-order-into-consid

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!