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); }
public bool TryPushData(Statistic.Human human) { if (Count >= capacity) { return(false); } channels[Count].PushHuman(human); Count++; Array.Sort(channels); return(true); }