[go: up one dir, main page]

Struct deque::Worker [] [src]

pub struct Worker<T: Send> {
    // some fields omitted
}

Worker half of the work-stealing deque. This worker has exclusive access to one side of the deque, and uses push and pop method to manipulate it.

There may only be one worker per deque.

Methods

impl<T: Send> Worker<T>
[src]

fn push(&self, t: T)

Pushes data onto the front of this work queue.

fn pop(&self) -> Option<T>

Pops data off the front of the work queue, returning None on an empty queue.

fn pool<'a>(&'a self) -> &'a BufferPool<T>

Gets access to the buffer pool that this worker is attached to. This can be used to create more deques which share the same buffer pool as this deque.

Trait Implementations

impl<T: Send> Send for Worker<T>
[src]