开发者

StartService takes a very long time on startup

开发者 https://www.devze.com 2023-03-07 12:18 出处:网络
I have a windows service S1 with dependency X. The service is automatic and it starts without any problems.

I have a windows service S1 with dependency X. The service is automatic and it starts without any problems.

This service starts another service S2 with same dependency X. The problem is that when I call StartService() to start S2, I don't return from the function for about a minute, and only than I start the entrance code of S2.

I am trying to understand why it takes so long to start the service, but I'm really out of ideas :-( .

Does anyone have any ideas ???

Tha开发者_如何学Gonks!


When do you start the other service S2? You cannot call StartService() until your service has reported a successful start. Is S2 a dependency of S1? If so, just mark it as such and let SCM worry about it.

0

精彩评论

暂无评论...
验证码 换一张
取 消