c# - In a windows service, will OnStop run if the OnStart is blocked? -
if onstart method
while (true) { // stuff }
will onstop run in case? or have create new thread such thread onstart running on unblocks?
the thread calls onstart
doesn't "belong" you. you're not meant block it. should use set threads, timers, listeners on network, etc, , return onstart
method.
only when return onstart
service control manager transition service starting
started
.
Comments
Post a Comment