pub fn generic_channel<MutexType, T, A>(
            capacity: usize,
        ) -> (
            GenericSender<MutexType, T, A>,
            GenericReceiver<MutexType, T, A>,
        )
        where
            MutexType: RawMutex,
            A: RingBuf<Item = T>,
            T: Send,
        {
            let inner = alloc::sync::Arc::new(GenericChannelSharedState {
                channel: GenericChannel::with_capacity(capacity),
                senders: AtomicUsize::new(1),
                receivers: AtomicUsize::new(1),
            });

            let sender = GenericSender {
                inner: inner.clone(),
            };
            let receiver = GenericReceiver { inner };

            (sender, receiver)
        }
/// Creates a new Channel which can be used to exchange values of type `T` between
/// concurrent tasks. The ends of the Channel are represented through
/// the returned Sender and Receiver.
/// Both the Sender and Receiver can be cloned in order to let more tasks
/// interact with the Channel.
///
/// As soon es either all Senders or all Receivers are closed, the Channel
/// itself will be closed.
///
/// The channel can buffer up to `capacity` items internally.
Creates a new Channel which can be used to exchange values of type `T` between
concurrent tasks. The ends of the Channel are represented through
the returned Sender and Receiver.
Both the Sender and Receiver can be cloned in order to let more tasks
interact with the Channel.

As soon es either all Senders or all Receivers are closed, the Channel
itself will be closed.

The channel can buffer up to `capacity` items internally.
Creates a new Channel which can be used to exchange values of type ` T ` between concurrent tasks . The ends of the Channel are represented through the returned Sender and Receiver . Both the Sender and Receiver can be cloned in order to let more tasks interact with the Channel . As soon es either all Senders or all Receivers are closed the Channel itself will be closed . The channel can buffer up to ` capacity ` items internally .
pub fn generic_channel<MutexType, T, A>(
            capacity: usize,
        ) -> (
            GenericSender<MutexType, T, A>,
            GenericReceiver<MutexType, T, A>,
        )
        where
            MutexType: RawMutex,
            A: RingBuf<Item = T>,
            T: Send,
        {
            let inner = alloc::sync::Arc::new(GenericChannelSharedState {
                channel: GenericChannel::with_capacity(capacity),
                senders: AtomicUsize::new(1),
                receivers: AtomicUsize::new(1),
            });
            let sender = GenericSender {
                inner: inner.clone(),
            };
            let receiver = GenericReceiver { inner };
            (sender, receiver)
        }
pub fn generic_channel < MutexType , T , A > ( capacity : usize , ) -> ( GenericSender < MutexType , T , A > , GenericReceiver < MutexType , T , A > , ) where MutexType : RawMutex , A : RingBuf < Item = T > , T : Send , { let inner = alloc :: sync :: Arc :: new ( GenericChannelSharedState { channel : GenericChannel :: with_capacity ( capacity ) , senders : AtomicUsize :: new ( 1 ) , receivers : AtomicUsize :: new ( 1 ) , } ) ; let sender = GenericSender { inner : inner . clone ( ) , } ; let receiver = GenericReceiver { inner } ; ( sender , receiver ) }
Creates a new Channel which can be used to exchange values of type `T` between
concurrent tasks.
Creates a new Channel which can be used to exchange values of type ` T ` between concurrent tasks .
capacity
usize
capacity
usize