public TaskGroupManager() { taskGroupMap = new Dictionary <string, ITaskGroup>(); curTaskGroup = null; isProducerThreadRunning = false; isWorkerThreadRunning = false; isNoticeStop = false; performance = new TaskGroupPerformance(); }
public void Clear() { this.curTaskGroup = null; if (performance != null) { performance.Clear(); } isProducerThreadRunning = false; isWorkerThreadRunning = false; isNoticeStop = false; }
public ITaskGroup CreateTaskGroupByName(string name, Control container) { if (curTaskGroup != null) { return(null); } if (!taskGroupMap.ContainsKey(name)) { return(null); } if (!taskGroupMap[name].Init(container)) { return(null); } curTaskGroup = taskGroupMap[name]; return(curTaskGroup); }