Struct rustc_rayon_core::WorkerLocal [−][src]
pub struct WorkerLocal<T> { /* fields omitted */ }
Holds worker-locals values for each thread in a thread pool. You can only access the worker local value through the Deref impl on the thread pool it was constructed on. It will panic otherwise
Methods
impl<T> WorkerLocal<T>
[src]
impl<T> WorkerLocal<T>
pub fn new<F: FnMut(usize) -> T>(initial: F) -> WorkerLocal<T>
[src]
pub fn new<F: FnMut(usize) -> T>(initial: F) -> WorkerLocal<T>
Creates a new worker local where the initial
closure computes the
value this worker local should take for each thread in the thread pool.
pub fn into_inner(self) -> Vec<T>
[src]
pub fn into_inner(self) -> Vec<T>
Returns the worker-local value for each thread
impl<T> WorkerLocal<Vec<T>>
[src]
impl<T> WorkerLocal<Vec<T>>
Trait Implementations
impl<T> Send for WorkerLocal<T>
[src]
impl<T> Send for WorkerLocal<T>
impl<T> Sync for WorkerLocal<T>
[src]
impl<T> Sync for WorkerLocal<T>
impl<T: Debug> Debug for WorkerLocal<T>
[src]
impl<T: Debug> Debug for WorkerLocal<T>
fn fmt(&self, f: &mut Formatter) -> Result
[src]
fn fmt(&self, f: &mut Formatter) -> Result
Formats the value using the given formatter. Read more
impl<T> Deref for WorkerLocal<T>
[src]
impl<T> Deref for WorkerLocal<T>