Example #1
0
 /// <summary>
 /// Create n-threads from the IO thread pool and process the data in the processor delegate which is fetched
 /// from the work queue.
 /// </summary>
 /// <param name="width">Number of IO threads to start in parallel.</param>
 /// <param name="processor">Delegate which is called in width threads to process work.</param>
 /// <param name="workList">List of blocking queues. The input queues are processed in the order they were added.</param>
 /// <param name="options">Exception handling options.</param>
 public WorkItemDispatcher(int width, Action <T> processor, BlockingQueueAggregator <T> workList, WorkItemOptions options) :
     this(width, processor, null, workList, options)
 {
 }
Example #2
0
 /// <summary>
 /// Create n-threads from the IO thread pool and process the data in the processor delegate which is fetched
 /// from the work queue.
 /// </summary>
 /// <param name="width">Number of IO threads to start in parallel.</param>
 /// <param name="processor">Delegate which is called in width threads to process work.</param>
 /// <param name="name">Instance Name of the Dispatcher.</param>
 /// <param name="workList">List of blocking queues. The input queues are processed in the order they were added.</param>
 /// <param name="options">Exception handling options.</param>
 public WorkItemDispatcher(int width, Action <T> processor, string name, BlockingQueueAggregator <T> workList, WorkItemOptions options) :
     this(new WorkItemDispatcherData <T>() { Width = width, Processor = processor, Name = name, InputDataList = workList, Options = options })
 {
 }
Example #3
0
 /// <summary>
 /// Initializes a new instance of the <see cref="WorkItemDispatcher&lt;T&gt;"/> class.
 /// </summary>
 /// <param name="width">Number of IO threads to start in parallel.</param>
 /// <param name="processor">Delegate which is called in width threads to process work.</param>
 /// <param name="name">Instance Name of the Dispatcher.</param>
 /// <param name="workList">List of blocking queues. The input queues are processed in the order they were added.</param>
 public WorkItemDispatcher(int width, Action <T> processor, string name, BlockingQueueAggregator <T> workList) :
     this(width, processor, name, workList, WorkItemOptions.Default)
 {
 }