Exemple #1
0
        private long pause  = 1; // 标记是否暂停

        public DUWorker()
        {
            workfolder          = string.Empty;
            logicProcessorCount = Utils.GetLogicProcessorCount();
            persister           = new DUWorkerPersister(this);
            queue            = new DUQueue(this);
            queue.OnEnqueue += queue_OnEnqueue;
            queue.OnRemove  += queue_OnRemove;
        }
Exemple #2
0
        private long status = 0; // 标记当前是否处于启动状态

        #endregion Fields

        #region Constructors

        public DUWorker()
        {
            workfolder = string.Empty;
            logicProcessorCount = Utils.GetLogicProcessorCount();
            persister = new DUWorkerPersister(this);
            queue = new DUQueue(this);
            queue.OnEnqueue += queue_OnEnqueue;
            queue.OnRemove += queue_OnRemove;
        }