Exemple #1
0
        protected virtual void TriggerGet(Event @event = null)
        {
            var current = GetQueue.First;

            while (current != null)
            {
                var get = current.Value;
                DoGet(get);
                if (get.IsTriggered)
                {
                    var next = current.Next;
                    GetQueue.Remove(current);
                    current = next;
                    TriggerWhenEmpty();
                    TriggerWhenChange();
                }
                else
                {
                    current = current.Next;
                }
                if (Items.Count == 0)
                {
                    break;
                }
            }
            Utilization?.UpdateTo(Count / (double)Capacity);
            WIP?.UpdateTo(Count + PutQueue.Count + GetQueue.Count);
            GetQueueLength?.UpdateTo(GetQueue.Count);
        }
Exemple #2
0
 protected virtual void TriggerGet(Event @event = null)
 {
     while (GetQueue.Count > 0)
     {
         var get = GetQueue.Peek();
         DoGet(get);
         if (get.IsTriggered)
         {
             GetQueue.Dequeue();
             TriggerWhenAtMost();
             TriggerWhenChange();
         }
         else
         {
             break;
         }
     }
     Fillrate?.UpdateTo(Level / Capacity);
     GetQueueLength?.UpdateTo(GetQueue.Count);
 }
Exemple #3
0
 protected virtual void TriggerGet(Event @event = null)
 {
     while (GetQueue.Count > 0)
     {
         var get = GetQueue.Peek();
         DoGet(get);
         if (get.IsTriggered)
         {
             GetQueue.Dequeue();
             TriggerWhenEmpty();
             TriggerWhenChange();
         }
         else
         {
             break;
         }
     }
     Utilization?.UpdateTo(Count / (double)Capacity);
     WIP?.UpdateTo(Count + PutQueue.Count + GetQueue.Count);
     GetQueueLength?.UpdateTo(GetQueue.Count);
 }