protected override void OnStart(string[] args) { lock (_sync) { _terminated = false; _thread = new Thread(ThreadProc); _thread.Start(); } }