pub fn channel_from_parts<T: Sync>(
queue: &'static mut [SyncUnsafeCell<CachePadded<Option<T>>>],
write_offset: &'static mut AtomicUsize,
read_offset: &'static mut AtomicUsize,
write_semaphore: &'static mut Semaphore,
) -> Channel<T>
Expand description
Creates a new channel from its raw parts.
The queue should be one longer than the actual bound of the queue, so a
channel with room for 3 buffered elements should have a slice of length 4 as
the queue
.