Example #1
0
 private void RemoveFromProgress(waitableasync value)
 {
     _lockStepInProgress.EnterWriteLock();
     try
     {
         StepInProgress.Remove(value);
     }
     finally
     {
         _lockStepInProgress.ExitWriteLock();
     }
 }
Example #2
0
        protected override void AddInProgress(Step step)
        {
            var a = new async(() => FindSolution(step), _threadPool);

            _lockStepInProgress.EnterWriteLock();
            try
            {
                StepInProgress.Add(a);
            }
            finally
            {
                _lockStepInProgress.ExitWriteLock();
            }
        }
Example #3
0
 private void ClearFinished()
 {
     _lockStepInProgress.EnterWriteLock();
     try
     {
         foreach (var value in StepInProgress.Where(e => e.ExecutionCompleted).ToArray())
         {
             StepInProgress.Remove(value);
         }
     }
     finally
     {
         _lockStepInProgress.ExitWriteLock();
     }
 }
Example #4
0
 protected override void AddInProgress(Step step)
 {
     StepInProgress.Add(step);
     FindSolution(step);
     StepInProgress.Remove(step);
 }