Ejemplo n.º 1
0
        internal void EnqueueIndependent(WorkItem item)
        {
            var chain = new WorkChain(this);

            chain.AppendItem(item);

            chain.StartProcessing();
        }
Ejemplo n.º 2
0
        internal void SetOwningChain(WorkChain workChain)
        {
            if (_owningChain != null)
            {
                throw new InvalidOperationException("Cannot set owning chain multiple times");
            }

            _owningChain = workChain;
        }
Ejemplo n.º 3
0
        internal void EnqueueChain(WorkChain chain)
        {
            var work = chain.ProcessedItem;

            Debug.Assert(work.PlannedProcessor == this, "Cannot process item on current processor");

            lock (_L_toProcess)
            {
                _toProcess.Enqueue(work);
                Monitor.Pulse(_L_toProcess);
            }
        }