Exemple #1
0
 public ThreadPoolExecutor(CancellationToken token, ConcurrentQueue <IOddJobWithMetadata> jobQueue, IJobExecutor jobExecutor, ThreadPoolJobStateHandler jobStateHandler, ThreadPoolCoordinator coordinator)
 {
     _token       = token;
     _jobQueue    = jobQueue;
     _jobExecutor = jobExecutor;
     _coordinator = coordinator;
 }
Exemple #2
0
 public ThreadPoolQueueFiller(IJobQueueManager queueManager, ConcurrentQueue <IOddJobWithMetadata> queue, IJobStateExtension stateExtension, string queueName, int fetchSize, TimeSpan interval, CancellationToken cancelToken, ThreadPoolCoordinator coordinator)
 {
     _queueManager      = queueManager;
     _queueName         = queueName;
     _fetchSize         = fetchSize;
     _cancelToken       = cancelToken;
     _jobStateExtension = stateExtension;
     _timer             = new Timer((state) => PulseQueue(), null, (int)(interval.TotalMilliseconds / 2), (int)interval.TotalMilliseconds);
 }