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