Exemple #1
0
 public TaskGroupManager()
 {
     taskGroupMap            = new Dictionary <string, ITaskGroup>();
     curTaskGroup            = null;
     isProducerThreadRunning = false;
     isWorkerThreadRunning   = false;
     isNoticeStop            = false;
     performance             = new TaskGroupPerformance();
 }
Exemple #2
0
 public void Clear()
 {
     this.curTaskGroup = null;
     if (performance != null)
     {
         performance.Clear();
     }
     isProducerThreadRunning = false;
     isWorkerThreadRunning   = false;
     isNoticeStop            = false;
 }
Exemple #3
0
        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);
        }