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

TaskStarting() public method

Notify that a task is starting.
public TaskStarting ( ) : void
return void
        public void TaskStarting()
        {
            lock (this)
            {
                _totalTasks++;
            }
        }

Usage Example

Ejemplo n.º 1
0
        /// <summary>
        /// Process the specified task.  It will be processed either now,
        /// or queued to process on the thread pool.
        /// </summary>
        /// <param name="task">The task to process.</param>
        /// <param name="group">The group this task belongs to.</param>
        public void ProcessTask(IEngineTask task, TaskGroup group)
        {
            lock (this)
            {
                _activeTasks++;
            }
            if (group != null)
            {
                group.TaskStarting();
            }
            var item = new PoolItem(this, task, group);

            ThreadPool.QueueUserWorkItem(item.ThreadPoolCallback);
        }
All Usage Examples Of Encog.Util.Concurrency.TaskGroup::TaskStarting