Encog.Util.Concurrency.TaskGroup.TaskStopping C# (CSharp) Method

TaskStopping() public method

Notify that a task is stopping.
public TaskStopping ( ) : void
return void
        public void TaskStopping()
        {
            lock (this)
            {
                _completedTasks++;
                _completeEvent.Set();
            }
        }

Usage Example

Ejemplo n.º 1
0
 /// <summary>
 /// The thread callback.  This actually executes the task.
 /// </summary>
 /// <param name="threadContext">The thread context, not used.</param>
 public void ThreadPoolCallback(Object threadContext)
 {
     try
     {
         _task.Run();
         _owner.TaskFinished(this);
     }
     finally
     {
         if (_group != null)
         {
             _group.TaskStopping();
         }
     }
 }