AppMetrics.AgentService.AgentServiceClass.ThreadProc C# (CSharp) Method

ThreadProc() private method

private ThreadProc ( ) : void
return void
        void ThreadProc()
        {
            try
            {
                while (!_terminated)
                {
                    if (!_initDone)
                    {
                        try
                        {
                            Init();
                            FindPlugins();
                            EnsurePluginsStopped();
                            _initDone = true;
                        }
                        catch (ThreadAbortException)
                        {
                            break;
                        }
                        catch (Exception exc)
                        {
                            Report(exc);
                        }
                    }

                    if (_initDone)
                    {
                        try
                        {
                            ApplyUpdates();
                        }
                        catch (ThreadAbortException)
                        {
                            break;
                        }
                        catch (Exception exc)
                        {
                            Report(exc);
                        }

                        try
                        {
                            EnsurePluginsStarted();
                        }
                        catch (ThreadAbortException)
                        {
                            break;
                        }
                        catch (Exception exc)
                        {
                            Report(exc);
                        }
                    }

                    Thread.Sleep(AutoUpdateCheckPeriod);
                }
            }
            catch (ThreadAbortException)
            {
            }
        }