pub fn new() -> Self {
        let channel = Channel {
            head: CachePadded::new(Position {
                index: AtomicUsize::new(0),
                block: Atomic::null(),
            }),
            tail: CachePadded::new(Position {
                index: AtomicUsize::new(0),
                block: Atomic::null(),
            }),
            is_closed: AtomicBool::new(false),
            receivers: SyncWaker::new(),
            _marker: PhantomData,
        };

        // Allocate an empty block for the first batch of messages.
        let block = unsafe { Owned::new(Block::new(0)).into_shared(epoch::unprotected()) };
        channel.head.block.store(block, Ordering::Relaxed);
        channel.tail.block.store(block, Ordering::Relaxed);

        channel
    }
/// Creates a new unbounded channel.
Creates a new unbounded channel.
Creates a new unbounded channel .
pub fn new() -> Self {
        let channel = Channel {
            head: CachePadded::new(Position {
                index: AtomicUsize::new(0),
                block: Atomic::null(),
            }),
            tail: CachePadded::new(Position {
                index: AtomicUsize::new(0),
                block: Atomic::null(),
            }),
            is_closed: AtomicBool::new(false),
            receivers: SyncWaker::new(),
            _marker: PhantomData,
        };
        // Allocate an empty block for the first batch of messages.
        let block = unsafe { Owned::new(Block::new(0)).into_shared(epoch::unprotected()) };
        channel.head.block.store(block, Ordering::Relaxed);
        channel.tail.block.store(block, Ordering::Relaxed);
        channel
    }
pub fn new ( ) -> Self { let channel = Channel { head : CachePadded :: new ( Position { index : AtomicUsize :: new ( 0 ) , block : Atomic :: null ( ) , } ) , tail : CachePadded :: new ( Position { index : AtomicUsize :: new ( 0 ) , block : Atomic :: null ( ) , } ) , is_closed : AtomicBool :: new ( false ) , receivers : SyncWaker :: new ( ) , _marker : PhantomData , } ; // Allocate an empty block for the first batch of messages. let block = unsafe { Owned :: new ( Block :: new ( 0 ) ) . into_shared ( epoch :: unprotected ( ) ) } ; channel . head . block . store ( block , Ordering :: Relaxed ) ; channel . tail . block . store ( block , Ordering :: Relaxed ) ; channel }
Creates a new unbounded channel.
Creates a new unbounded channel .