Struct hexodsp::monitor::MonitorBackend
source · [−]pub struct MonitorBackend {
rb_mon_prod: Producer<MonitorBufPtr>,
rb_recycle_con: Consumer<MonitorBufPtr>,
unused_monitor_buffers: Vec<MonitorBufPtr>,
}
Fields
rb_mon_prod: Producer<MonitorBufPtr>
rb_recycle_con: Consumer<MonitorBufPtr>
unused_monitor_buffers: Vec<MonitorBufPtr>
Holds enough monitor buffers to hold about 1-2 seconds of data. The MonitorBuf boxes are written in the backend and then sent via MonitorBackend::rb_mon_prod to the frontend. The frontend then sends the used MonitorBufPtr back via quick_update_con.
Implementations
sourceimpl MonitorBackend
impl MonitorBackend
sourcepub fn check_recycle(&mut self)
pub fn check_recycle(&mut self)
Checks if there are any used monitor buffers to be collected.
sourcepub fn get_unused_mon_buf(&mut self) -> Option<MonitorBufPtr>
pub fn get_unused_mon_buf(&mut self) -> Option<MonitorBufPtr>
Hands out an unused MonitorBuf for filling and sending to the MonitorProcessor thread.
sourcepub fn count_unused_mon_bufs(&self) -> usize
pub fn count_unused_mon_bufs(&self) -> usize
A helper function for writing tests. Returns the number of MonitorBuf we can hand out until there are none anymore.
sourcepub fn send_mon_buf(&mut self, buf: MonitorBufPtr)
pub fn send_mon_buf(&mut self, buf: MonitorBufPtr)
Sends a MonitorBuf to the MonitorProcessor.
Auto Trait Implementations
impl !RefUnwindSafe for MonitorBackend
impl Send for MonitorBackend
impl Sync for MonitorBackend
impl Unpin for MonitorBackend
impl !UnwindSafe for MonitorBackend
Blanket Implementations
sourceimpl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
const: unstable · sourcefn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more