Esempio n. 1
0
        public bool TryPopData(out Statistic.Human human)
        {
            if (!channels[0].IsWork)
            {
                human = null; return(false);
            }

            human = channels[0].PopHuman();
            Count--;
            Array.Sort(channels);
            return(true);
        }
Esempio n. 2
0
        public bool TryPushData(Statistic.Human human)
        {
            if (Count >= capacity)
            {
                return(false);
            }

            channels[Count].PushHuman(human);
            Count++;
            Array.Sort(channels);
            return(true);
        }