pub trait Using {
type Item: Send + 'static;
// Required methods
fn create(&mut self, thread_idx: usize) -> Self::Item;
fn into_inner(self) -> Self::Item;
}
Expand description
A type that can create
a value per thread, which will then be send to the thread,
and used mutable by the defined computation.
Required Associated Types§
Required Methods§
Sourcefn create(&mut self, thread_idx: usize) -> Self::Item
fn create(&mut self, thread_idx: usize) -> Self::Item
Creates an instance of the variable to be used by the thread_idx
-th thread.
Sourcefn into_inner(self) -> Self::Item
fn into_inner(self) -> Self::Item
Consumes self and creates exactly one instance of the variable.