pub(crate) struct PoolTaker {
pub(crate) pool: Arc<BufferPool>,
pub(crate) local: Vec<Vec<u8>>,
}Expand description
Sole-consumer view over the shared BufferPool for the capture thread.
Refills are batched into a local stash, so the per-frame take is lock-free in the
steady state, while returns from the delivery/Python side (AudioFrame drops) still go
back through the shared pool. Only the capture thread owns a PoolTaker.
Fields§
§pool: Arc<BufferPool>§local: Vec<Vec<u8>>Implementations§
Source§impl PoolTaker
impl PoolTaker
Sourcepub(crate) fn new(pool: Arc<BufferPool>) -> Self
pub(crate) fn new(pool: Arc<BufferPool>) -> Self
Wrap a shared pool with an empty local stash.
Auto Trait Implementations§
impl Freeze for PoolTaker
impl RefUnwindSafe for PoolTaker
impl Send for PoolTaker
impl Sync for PoolTaker
impl Unpin for PoolTaker
impl UnsafeUnpin for PoolTaker
impl UnwindSafe for PoolTaker
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more