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

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