pub fn consume_prefetch_budget(&self, buffers: &[VolatileSlice]) {
        if self.busy_workers.load(Ordering::Relaxed) > 0 {
            let size = buffers.iter().fold(0, |v, i| v + i.len());
            if let Some(v) = NonZeroU32::new(std::cmp::min(size, u32::MAX as usize) as u32) {
                // Try to consume budget but ignore result.
                if let Some(limiter) = self.prefetch_limiter.as_ref() {
                    let _ = limiter.check_n(v);
                }
            }
        }
    }
/// Consume network bandwidth budget for prefetching.
Consume network bandwidth budget for prefetching.
Consume network bandwidth budget for prefetching .
pub fn consume_prefetch_budget(&self, buffers: &[VolatileSlice]) {
        if self.busy_workers.load(Ordering::Relaxed) > 0 {
            let size = buffers.iter().fold(0, |v, i| v + i.len());
            if let Some(v) = NonZeroU32::new(std::cmp::min(size, u32::MAX as usize) as u32) {
                // Try to consume budget but ignore result.
                if let Some(limiter) = self.prefetch_limiter.as_ref() {
                    let _ = limiter.check_n(v);
                }
            }
        }
    }
pub fn consume_prefetch_budget ( & self , buffers : & [ VolatileSlice ] ) { if self . busy_workers . load ( Ordering :: Relaxed ) > 0 { let size = buffers . iter ( ) . fold ( 0 , | v , i | v + i . len ( ) ) ; if let Some ( v ) = NonZeroU32 :: new ( std :: cmp :: min ( size , u32 :: MAX as usize ) as u32 ) { // Try to consume budget but ignore result. if let Some ( limiter ) = self . prefetch_limiter . as_ref ( ) { let _ = limiter . check_n ( v ) ; } } } }
Consume network bandwidth budget for prefetching.
Consume network bandwidth budget for prefetching .
&self
buffers
&[VolatileSlice]
&self
buffers
&[VolatileSlice]