Beispiel #1
0
        /// <summary>
        /// Stop the service thread.
        /// </summary>
        protected override void Stop()
        {
            //TODO CR (Jan 2014): Move this into the base if it applies to all subclasses?
            PersistentStoreRegistry.GetDefaultStore().ShutdownRequested = true;

            _threadPool.Stop(true);
        }
Beispiel #2
0
        private void ProcessFilesystem()
        {
            foreach (string studyFolder in DirectoryList)
            {
                ProcessStudyFolder(studyFolder);

                if (_cancelRequested)
                {
                    break;
                }
            }

            while (_threadPool.Active && (_threadPool.QueueCount > 0 || _threadPool.ActiveCount > 0))
            {
                if (_cancelRequested)
                {
                    break;
                }
                Thread.Sleep(500);
                if (_cancelRequested)
                {
                    break;
                }
            }

            _threadPool.Stop(false);
        }
Beispiel #3
0
 /// <summary>
 /// Stop the service thread.
 /// </summary>
 protected override void Stop()
 {
     _threadPool.Stop(true);
 }