コード例 #1
0
        public IMultiThreadExecutor AddOperation(MultiThreadExecutorOperation operation)
        {
            this.operationQueue.Enqueue(operation);

            // Signal that operation added in to the queue.
            this.simultaneouslyRunningLimit.Set();

            lock (this.operationLoopSync)
            {
                if (this.operationQueue.Count == 1 && this.start && !this.operationLoop)
                {
                    this.Start(true);
                }
            }

            return(this);
        }
コード例 #2
0
 public OperationInWorkState(MultiThreadExecutorOperation operation, Thread workThread)
 {
     this.operation  = operation;
     this.workThread = workThread;
 }