// 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); }
// 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); }