/// <summary> /// InterfaceQueueAsyncProcessor constructor /// </summary> /// <param name="logic">Implementation of the item processing logic</param> /// <param name="threadCount">Number of processing threads</param> /// <param name="queue">Processing queue (current instances of <see cref="QueueAsyncProcessor{T}"/> becomes the owner)</param> /// <param name="name">The name for this instance of <see cref="QueueAsyncProcessor{T}"/> and its threads</param> public InterfaceQueueAsyncProcessor(IQueueAsyncProcessorLogic <T> logic, int threadCount, IQueue <T> queue, string name) : base(threadCount, queue, name, false) { if (logic == null) { throw new ArgumentNullException(nameof(logic)); } _logic = logic; }
/// <summary> /// InterfaceQueueAsyncProcessor constructor /// </summary> /// <param name="logic">Implementation of the item processing logic</param> /// <param name="threadCount">Number of processing threads</param> /// <param name="maxQueueSize">The bounded size of the queue (if less or equal to 0 then no limitation)</param> /// <param name="name">The name for this instance of <see cref="QueueAsyncProcessor{T}"/> and its threads</param> /// <param name="isBackground">Whether or not processing threads are background threads</param> public InterfaceQueueAsyncProcessor(IQueueAsyncProcessorLogic <T> logic, int threadCount, int maxQueueSize, string name, bool isBackground) : base(threadCount, maxQueueSize, name, isBackground) { if (logic == null) { throw new ArgumentNullException(nameof(logic)); } _logic = logic; }
/// <summary> /// InterfaceQueueAsyncProcessor constructor /// </summary> /// <param name="logic">Implementation of the item processing logic</param> /// <param name="threadCount">Number of processing threads</param> /// <param name="name">The name for this instance of <see cref="QueueAsyncProcessor{T}"/> and its threads</param> public InterfaceQueueAsyncProcessor(IQueueAsyncProcessorLogic <T> logic, int threadCount, string name) : this(logic, threadCount, -1, name, false) { }
/// <summary> /// InterfaceQueueAsyncProcessor constructor /// </summary> /// <param name="logic">Implementation of the item processing logic</param> /// <param name="threadCount">Number of processing threads</param> public InterfaceQueueAsyncProcessor(IQueueAsyncProcessorLogic <T> logic, int threadCount) : this(logic, threadCount, -1, null, false) { }