コード例 #1
0
        //  Reads an item from the pipe. Returns false if there is no value.
        //  available.
        public bool Read(ref T value)
        {
            //  Try to prefetch a value.
            if (!CheckRead())
            {
                return(false);
            }

            //  There was at least one value prefetched.
            //  Return it to the caller.
            value = m_queue.Pop();

            return(true);
        }
コード例 #2
0
ファイル: YPipe.cs プロジェクト: SPERONIS/Communication_Mono
        //  Reads an item from the pipe. Returns false if there is no value.
        //  available.
        public T Read()
        {
            //  Try to prefetch a value.
            if (!CheckRead())
            {
                return(null);
            }

            //  There was at least one value prefetched.
            //  Return it to the caller.
            T value = m_queue.Pop();

            return(value);
        }