c# - Orleans grain 代码中的响应式(Reactive)扩展

标签 c# system.reactive orleans

https://github.com/dotnet/reactive 有重大更新项目:

v4.0 changes

Ix Async 4.0 has a breaking change from prior versions due to being the first LINQ implementation to support the new C# 8 async streams feature. This means for .NET Standard 2.1 and .NET Core 3 targets, we use the in-box interfaces for IAsyncEnumerable and friends. On other platforms, we provide the implementation, so you can use await foreach and create async iterators as you would expect. The types will unify to the system ones where the platform provides it.

There are many breaking changes here; a full set of change notes is on the way.

可以在Orleans代码中使用这个库来处理grains中的流吗?我知道 RX 使用它自己的调度程序来运行观察者和订阅(例如 ObserveOn()SubscribeOn()),我很好奇这是否会与 Orlean 自己的冲突调度程序,或者如果有办法让 RX 得到尊重,或者通过在上述方法中将其传递给 RX 来利用 Orlean 的任务运行器。

最佳答案

根据GitHub issue #315上的最新更新, Rx.NET奥尔良不支持。理论上它应该可以工作,建议考虑使用类似的东西:

var rxScheduler = new TaskPoolScheduler(new TaskFactory(RuntimeContext.Current));

我在 Gitter channel 中也没有发现任何有用的信息历史。

关于c# - Orleans grain 代码中的响应式(Reactive)扩展,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/55087858/

相关文章:

c# - 在 Asp.net core 上实现 Ooui

c# - 使用 .NET 响应式(Reactive)扩展而不是以下 'Run if not Running' 模式

Azure Service Fabric 与 Project Orleans 中的参与者粒度

actor - Actor 模型框架和复杂事件处理 (CEP) 之间有什么区别?

c# - 在T-SQL中处理CLR存储过程的多个结果

c# - 遍历一个类的属性

c# - 这种订阅事件的模式可以吗?

c# - 确保奥尔良管道执行中的消息顺序

c# - 无法找到 ViewModel 的 View ,即使 SelectedAssembly 被覆盖

system.reactive - 如何用 observables 定义循环