public JobQueue(IJobQueueMonitor monitor, IJobQueueConfig config) { _monitor = monitor; _config = config; monitor.WorkWithQueue(this); InitCollections(); }
public void SetUp() { _tokenSource = new CancellationTokenSource(); _testJobQueueMonitor = new TestMonitor(); _jobQueueConfig = new JobQueueConfig(_tokenSource.Token, MaxConsurrentJobs); _jobQueue = new JobQueue(_testJobQueueMonitor, _jobQueueConfig); Task.Factory.StartNew(_jobQueue.TryRun); }