Exemplo n.º 1
0
 protected override IList <QueueProcessor> GetProcessors()
 {
     WorkItemProcessor.CreateProcessor(WorkItemServiceSettings.Default.StatThreadCount, WorkItemServiceSettings.Default.NormalThreadCount, GetDisplayName());
     return(new List <QueueProcessor> {
         WorkItemProcessor.Instance
     });
 }
Exemplo n.º 2
0
        /// <summary>
        ///     Initialize the singleton <see cref="WorkItemProcessor" />.
        /// </summary>
        /// <param name="numberStatThreads">The number of thread to process stat and high priority work item.</param>
        /// <param name="numberNormalThreads">The number of thread to process normal priority work item.</param>
        /// <param name="name"></param>
        public static void CreateProcessor(int numberStatThreads, int numberNormalThreads, string name)
        {
            if (Instance != null)
            {
                throw new ApplicationException("Processor already created!");
            }

            Instance = new WorkItemProcessor(numberStatThreads, numberNormalThreads, name);
        }