gpt4 book ai didi

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

转载 作者:行者123 更新时间:2023-11-30 17:27:26 24 4
gpt4 key购买 nike

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/

24 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com