public void CopyTo(T[] array, int arrayIndex)
        {
            if (array == null)
            {
                throw new ArgumentNullException(nameof(array));
            }

            if ((uint)arrayIndex > array.Length)
            {
                throw new ArgumentOutOfRangeException(nameof(arrayIndex));
            }

            if (array.Length - arrayIndex < Count)
            {
                throw new ArgumentException("Insufficient space in the target location to copy the information.");
            }

            if (array.Length == 0)
            {
                return;
            }

            UnsafeMPMCQueue.ToArray <T>(m_inner).CopyTo(array, arrayIndex);
        }
 public T[] ToArray()
 {
     return(UnsafeMPMCQueue.ToArray <T>(m_inner));
 }