0

.Net3.5 SP1 V1.0.2856.0 の Reactive Extensions をインストールしました。1行のコードに基づいてWindowsサービスを構築しています

 Scheduler.NewThread.Schedule(action, new DateTimeOffset(startDate)); 

スレッドは時間通りに開始しますが、しばらくするとアプリケーションがクラッシュします:-

System.ArgumentOutOfRangeException was unhandled
   Message="Number must be either non-negative and less than or equal to Int32.MaxValue or -1.\r\nParameter name: timeout"
   Source="mscorlib"
   ParamName="timeout"
   StackTrace:
        at System.Threading.Thread.Sleep(TimeSpan timeout)
        at System.Concurrency.NewThreadScheduler.<>c__DisplayClass1.<Schedule>b__0()
        at System.Threading.ExecutionContext.Run(ExecutionContext executionContext, ContextCallback callback, Object state)
        at System.Threading.ThreadHelper.ThreadStart()
   InnerException: 

Windows Update をアンインストールし、Reactive Extensions インストーラーの修復オプションを使用しました。それでも何も機能しません。レジストリに変更された値があり、元に戻す必要があると思います。

4

1 に答える 1

0

Thread.Sleep例外スタック トレースは、スケジュールされたアクションが実行されていることを示しているため、渡されたアクションに誤った値の呼び出しが含まれていると推測されます。マイナスですか?

于 2013-11-13T00:09:23.997 に答える