internal void AutoNext() { while (m_WaitingTaskList.Count > 0 && (m_MaxTask <= 0 || m_RunningTaskList.Count < m_MaxTask)) { cGatherTask task = m_WaitingTaskList[0]; task.Start(); } }
internal void StartTask(cGatherTask task) { if (task.TaskState == cGlobalParas.TaskState.UnStart || task.TaskState == cGlobalParas.TaskState.Stopped || task.TaskState == cGlobalParas.TaskState.Failed || task.TaskState == cGlobalParas.TaskState.Aborted) { if (m_MaxTask <= 0 || m_RunningTaskList.Count < m_MaxTask) { task.Start(); } else { task.ReadyToStart(); } } }