Exemple #1
0
 internal void OnTaskCompleted(ChromatogramGeneratorTask chromatogramGeneratorTask)
 {
     lock (LockObj)
     {
         _completedCount++;
         _executingTasks.Remove(chromatogramGeneratorTask);
         Monitor.PulseAll(LockObj);
         EnsureMinTasksRunning();
     }
 }
Exemple #2
0
 private void StartTask(ChromatogramGeneratorTask task)
 {
     lock (this)
     {
         if (task.IsStarted())
         {
             return;
         }
         task.Start();
         _executingTasks.Add(task);
     }
 }
Exemple #3
0
 public ChromTaskList(Action checkCancelledAction, SrmDocument srmDocument, ChorusAccount chorusAccount, ChorusUrl chorusUrl, IEnumerable<ChromatogramRequestDocument> chromatogramRequestDocuments)
 {
     SrmDocument = srmDocument;
     ChorusSession = new ChorusSession();
     _checkCancelledAction = checkCancelledAction;
     _chromatogramGeneratorTasks = new List<ChromatogramGeneratorTask>();
     _chromKeys = new Dictionary<ChromKey, ChromatogramGeneratorTask>();
     foreach (var chunk in chromatogramRequestDocuments)
     {
         ChromatogramGeneratorTask task = new ChromatogramGeneratorTask(this, chorusAccount, chorusUrl, chunk);
         _chromatogramGeneratorTasks.Add(task);
         foreach (ChromKey chromKey in ListChromKeys(chunk))
         {
             _chromKeys[chromKey] = task;
         }
     }
     _executingTasks = new HashSet<ChromatogramGeneratorTask>();
 }
Exemple #4
0
 public ChromTaskList(Action checkCancelledAction, SrmDocument srmDocument, ChorusAccount chorusAccount, ChorusUrl chorusUrl, IEnumerable <ChromatogramRequestDocument> chromatogramRequestDocuments)
 {
     SrmDocument                 = srmDocument;
     ChorusSession               = new ChorusSession();
     _checkCancelledAction       = checkCancelledAction;
     _chromatogramGeneratorTasks = new List <ChromatogramGeneratorTask>();
     _chromKeys = new Dictionary <ChromKey, ChromatogramGeneratorTask>();
     foreach (var chunk in chromatogramRequestDocuments)
     {
         ChromatogramGeneratorTask task = new ChromatogramGeneratorTask(this, chorusAccount, chorusUrl, chunk);
         _chromatogramGeneratorTasks.Add(task);
         foreach (ChromKey chromKey in ListChromKeys(chunk))
         {
             _chromKeys[chromKey] = task;
         }
     }
     _executingTasks = new HashSet <ChromatogramGeneratorTask>();
 }
Exemple #5
0
 private void StartTask(ChromatogramGeneratorTask task)
 {
     lock (this)
     {
         if (task.IsStarted())
         {
             return;
         }
         task.Start();
         _executingTasks.Add(task);
     }
 }
Exemple #6
0
 internal void OnTaskCompleted(ChromatogramGeneratorTask chromatogramGeneratorTask)
 {
     lock (LockObj)
     {
         _completedCount++;
         _executingTasks.Remove(chromatogramGeneratorTask);
         Monitor.PulseAll(LockObj);
         EnsureMinTasksRunning();
     }
 }