pub struct BounceBufferTracker { /* private fields */ }
Expand description
Tracks active bounce buffers against a set limit of pages. If no limit is specified a default of 8Mb will be applied. This limit is tracked per thread specified by the backing AffinitizedThreadpool.
Implementations§
Source§impl BounceBufferTracker
impl BounceBufferTracker
Sourcepub fn new(max_bounce_buffer_pages: usize, threads: usize) -> Self
pub fn new(max_bounce_buffer_pages: usize, threads: usize) -> Self
Create a new bounce buffer tracker.
Sourcepub async fn acquire_bounce_buffers<'a, 'b>(
&'b self,
size: usize,
thread: usize,
) -> Box<TrackedBounceBuffer<'a>>where
'b: 'a,
pub async fn acquire_bounce_buffers<'a, 'b>(
&'b self,
size: usize,
thread: usize,
) -> Box<TrackedBounceBuffer<'a>>where
'b: 'a,
Attempts to acquire bounce buffers from the tracker proceeding if pages are available or waiting until a tracked bounce buffer is dropped, which triggers the per-thread event to indicate newly freed pages.
Trait Implementations§
Auto Trait Implementations§
impl Freeze for BounceBufferTracker
impl RefUnwindSafe for BounceBufferTracker
impl Send for BounceBufferTracker
impl Sync for BounceBufferTracker
impl Unpin for BounceBufferTracker
impl UnwindSafe for BounceBufferTracker
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