BorderlessGaming.BorderlessGaming.DoMainWork C# (CSharp) Method

DoMainWork() private method

Update the processlist and process the favorites Invoke this method in a task or it will block
private DoMainWork ( ) : void
return void
        private void DoMainWork()
        {
            while (!this.workerTaskToken.IsCancellationRequested)
            {
                // update the processlist
                this.UpdateProcesses();

                if (this.AutoHandleFavorites)
                {
                    // check favorites against the cache
                    foreach (var pd in _processDetails)
                    {
                        foreach (var fav_process in Favorites)
                        {
                            if (fav_process.Matches(pd))
                            {
                                RemoveBorder(pd, fav_process);
                            }
                        }
                    }
                }
                Task.WaitAll(Task.Delay(3000));
            }
        }