struct Shared<T> {
buffer: Box<[RwLock<Slot<T>>]>,
mask: usize,
tail: Mutex<Tail>,
num_tx: AtomicUsize,
}
Expand description
Data shared between senders and receivers.
Fields§
§buffer: Box<[RwLock<Slot<T>>]>
slots in the channel.
mask: usize
Mask a position -> index.
tail: Mutex<Tail>
Tail of the queue. Includes the rx wait list.
num_tx: AtomicUsize
Number of outstanding Sender handles.
Implementations§
fn notify_rx<'a, 'b: 'a>(&'b self, tail: MutexGuard<'a, Tail>)
Auto Trait Implementations§
Blanket Implementations§
source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more