你如何确定方法是否应该返回IEnumerable<T>或IObservable<T>?
为什么我会选择一种范式而不是另一种?
我注意到当我在多线程上下文中使用protobuf-net时,它会间歇性地失败并出现以下错误:
System.TimeoutException: Timeout while inspecting metadata; this may indicate a deadlock.
This can often be avoided by preparing necessary serializers during application initialization, rather than allowing multiple threads to perform the initial metadata inspection
Run Code Online (Sandbox Code Playgroud)
但是,如果我在第一次序列化特定类型时锁定对protobuf-net序列化程序的访问,则它可以正常工作.
protobuf-net意味着线程安全,还是这只是一个bug?