且构网

分享程序员开发的那些事...
且构网 - 分享程序员编程开发的那些事

服务在永久和QUOT;启动"状态

更新时间:2022-03-28 20:09:02

我不熟悉.NET编写的服务,但在一般情况下,所使用的线程来启动服务并报告其初始状态不应该在同一个线程执行的实际工作。该服务应产生一个工作线程使切入点能够很快恢复状态,以供应链管理。

I'm not familiar with writing services in .NET, but in general, the thread that is used to start the service and report its initial status should not be the same thread that performs the actual work. The service should spawn a worker thread so the entry point can return status to the SCM quickly.