我们已经从 RX1.1.11111.1 迁移到 RX 2.0.20823.2。现在我们遇到了一个来自 EventLoopScheduler 的罕见异常:
an Unhandled Exception occured in non UI thread.
System.NullReferenceException: Object reference not set to an instance of an object.
at System.Reactive.Concurrency.EventLoopScheduler.Run()
at System.Threading.ExecutionContext.Run(ExecutionContext executionContext, ContextCallback callback, Object state, Boolean ignoreSyncCtx)
at System.Threading.ExecutionContext.Run(ExecutionContext executionContext, ContextCallback callback, Object state)
at System.Threading.ThreadHelper.ThreadStart()
有谁猜出是什么问题?是因为我们没有使用 onError 委托并且我们的方法之一失败了吗?
这是代码的要点:
EventLoopScheduler m_scheduler = new EventLoopScheduler();
. . .
m_receivedMessageHandler.StatusReceived.ObserveOn(m_scheduler) .Subscribe(p_unit => sendAll(m_retransmitManager, m_endPoint));
sendAll 中的异常会导致这种行为吗?