コード例 #1
0
        private ITuple NonBlockingTake(object key)
        {
            IList list = m_ts[key];

            if (list.Count > 0)
            {
                ITuple tuple = (ITuple)list[0];
                list.RemoveAt(0);
                tuple.OnTaken(this);
                if (TupleTaken != null)
                {
                    TupleTaken(this, tuple);
                }
                return(tuple);
            }
            else
            {
                return(null);
            }
        }