Struct sync::deque::BufferPool[src]

pub struct BufferPool<T> {
    // some fields omitted
}

The allocation pool for buffers used by work-stealing deques. Right now this structure is used for reclamation of memory after it is no longer in use by deques.

This data structure is protected by a mutex, but it is rarely used. Deques will only use this structure when allocating a new buffer or deallocating a previous one.

Methods

impl<T: Send> BufferPool<T>

fn new() -> BufferPool<T>

Allocates a new buffer pool which in turn can be used to allocate new deques.

fn deque(&self) -> (Worker<T>, Stealer<T>)

Allocates a new work-stealing deque which will send/receiving memory to and from this buffer pool.

Trait Implementations

impl<T: Send> Clone for BufferPool<T>

fn clone(&self) -> BufferPool<T>

fn clone_from(&mut self, source: &Self)