예제 #1
0
        public void Act()
        {
            Job j = _op.GetObject();

            _nStatsLock.EnterWriteLock();
            try
            {
                _waitOn.Remove(j.JobName);
                string node = j.GetAtt("workNode");

                var nd = _nStatsDic[node];

                var l = new List <string>(nd.PendingWork);
                l.Remove(j.JobName);
                var newNodeDesc = new NodeDescription(node, l);

                _nStatsDic[node] = newNodeDesc;
                _nStats.Remove(nd);
                _nStats.Add(newNodeDesc);
            }
            finally
            {
                _nStatsLock.ExitWriteLock();
            }

            lock (_results)
            {
                _results.Add(j);
            }
        }
예제 #2
0
        public void Act()
        {
            Job j = _pipe.GetObject();

            lock (_wq)
            {
                _wq.Enqueue(j);
            }
        }