Type Definition ringbuf::consumer::PostponedConsumer
source · pub type PostponedConsumer<T, R> = Consumer<T, RbWrap<RbReadCache<T, R>>>;
Expand description
Postponed consumer.
Implementations§
source§impl<T, R: RbRef> PostponedConsumer<T, R>where
R::Rb: RbRead<T>,
impl<T, R: RbRef> PostponedConsumer<T, R>where R::Rb: RbRead<T>,
sourcepub unsafe fn new_postponed(target: R) -> Self
pub unsafe fn new_postponed(target: R) -> Self
Create new postponed consumer.
Safety
There must be only one consumer containing the same ring buffer reference.
sourcepub fn sync(&mut self)
pub fn sync(&mut self)
Synchronize changes with the ring buffer.
Postponed consumer requires manual synchronization to make freed space visible for the producer.
sourcepub fn into_immediate(self) -> Consumer<T, R>
pub fn into_immediate(self) -> Consumer<T, R>
Synchronize and transform back to immediate consumer.