我有一个使用单例类的Windows服务ThreadQueue<T>.当服务启动时,它会调用ThreadQueue<string>.Start()此类,然后接受并将限制并发性的任务排队到可配置数量的线程.
ThreadQueue<string>.Start() 在服务启动时调用一次且仅调用一次.
有时,在运行几个小时后,我收到以下异常:
Application: myservice.exe
Framework Version: v4.0.30319
Description: The process was terminated due to an unhandled exception.
Exception Info: System.NullReferenceException
Stack:
at Apollo.Business.Framework.Threading.ThreadQueue.ThreadQueue`1[[System.__Canon, mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089]].Start()
at System.Threading.ThreadHelper.ThreadStart_Context(System.Object)
at System.Threading.ExecutionContext.RunInternal(System.Threading.ExecutionContext, System.Threading.ContextCallback, System.Object, Boolean)
at System.Threading.ExecutionContext.Run(System.Threading.ExecutionContext, System.Threading.ContextCallback, System.Object, Boolean)
at System.Threading.ExecutionContext.Run(System.Threading.ExecutionContext, System.Threading.ContextCallback, System.Object)
at System.Threading.ThreadHelper.ThreadStart()
Run Code Online (Sandbox Code Playgroud)
System.__Canon将此调用作为类型参数传递给它的是什么和什么?
谁能摆脱任何光明?