The thread that calls OnStart
doesn't "belong" to you. You're not meant to block it. You should use it to set up any threads, any timers, any listeners on the network, etc, and then return from the OnStart
method.
Only when you return from OnStart
will the service control manager transition your service from Starting
to Started
.