orx-concurrent-queue 1.2.0

A high performance and convenient thread safe queue that can concurrently grow and shrink with push, extend, pop and pull capabilities.
Documentation
use crate::ConcurrentQueue;
use orx_pinned_vec::{ConcurrentPinnedVec, IntoConcurrentPinnedVec};

impl<T, P> IntoIterator for ConcurrentQueue<T, P>
where
    T: Send,
    P: ConcurrentPinnedVec<T>,
    <P as ConcurrentPinnedVec<T>>::P: IntoConcurrentPinnedVec<T, ConPinnedVec = P>,
{
    type Item = T;

    type IntoIter = P::IntoIter;

    fn into_iter(mut self) -> Self::IntoIter {
        let range = self.valid_range();
        // SAFETY: we destruct the queue and immediately convert it into iter over the valid range.
        let convec = unsafe { self.destruct() }.0;
        // SAFETY: range is the only place with valid elements; positions on other sections
        // are either not initialized or popped.
        unsafe { convec.into_iter(range) }
    }
}