pub fn generic_channel<MutexType, T>(capacity: usize) ->
            (GenericSender<MutexType, T>, GenericReceiver<MutexType, T>)
        where MutexType: RawMutex, T: Send {
            let inner = std::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.
///
/// ```
/// # use futures_intrusive::channel::shared::channel;
/// let (sender, receiver) = channel::<i32>(4);
/// ```
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>(capacity: usize) ->
            (GenericSender<MutexType, T>, GenericReceiver<MutexType, T>)
        where MutexType: RawMutex, T: Send {
            let inner = std::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 > ( capacity : usize ) -> ( GenericSender < MutexType , T > , GenericReceiver < MutexType , T > ) where MutexType : RawMutex , T : Send { let inner = std :: 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
use futures_intrusive::channel::shared::channel;
None