Exemplo n.º 1
0
        private void ScanProc()
        {
            IncreseScanningThreadsCount();

            while (ScanTasks.Count != 0)
            {
                if (_stopScanningRequested)
                {
                    break;
                }

                ScanTasks.TryDequeue(out ScanTask task);

                NodesServer.ScanNode(task);

                RecalculateProgress();
            }

            DecreseScanningThreadsCount();
        }
Exemplo n.º 2
0
        private void RescanProc(IEnumerable <NotifyDynamicDictionary> selectedHosts)
        {
            IncreseScanningThreadsCount();

            foreach (var row in selectedHosts)
            {
                if (_stopScanningRequested)
                {
                    break;
                }

                if (Monitor.TryEnter(row, 0))
                {
                    NodesServer.ScanNode(new ScanTask(row));

                    Monitor.Exit(row);
                }
            }

            DecreseScanningThreadsCount();
        }
Exemplo n.º 3
0
        private void SuperviseProc()
        {
            IncreseScanningThreadsCount();

            foreach (var row in GridSource)
            {
                if (_stopScanningRequested)
                {
                    break;
                }

                if (Monitor.TryEnter(row, 0))
                {
                    NodesServer.ScanNode(new ScanTask(row));

                    Monitor.Exit(row);
                }
            }

            DecreseScanningThreadsCount();
        }