Struct triple_buffer::Input[][src]

pub struct Input<T: Send> { /* fields omitted */ }

Producer interface to the triple buffer

The producer of data can use this struct to submit updates to the triple buffer whenever he likes. These updates are nonblocking: a collision between the producer and the consumer will result in cache contention, but deadlocks and scheduling-induced slowdowns cannot happen.

Methods

impl<T: Send> Input<T>
[src]

Write a new value into the triple buffer

Check if the consumer has fetched our last submission yet

This method is only intended for diagnostics purposes. Please do not let it inform your decision of sending or not sending a value, as that would effectively be building a very poor spinlock-based double buffer implementation. If what you truly need is a double buffer, build yourself a proper blocking one instead of wasting CPU time.

Trait Implementations

impl<T: Debug + Send> Debug for Input<T>
[src]

Formats the value using the given formatter. Read more

Auto Trait Implementations

impl<T> Send for Input<T>

impl<T> Sync for Input<T>