Struct std::thread::BuilderUnstable
[-]
[+]
[src]
pub struct Builder { // some fields omitted }
Thread configuation. Provides detailed control over the properties and behavior of new threads.
Methods
impl Builder
fn new() -> Builder
Generate the base configuration for spawning a thread, from which configuration methods can be chained.
fn name(self, name: String) -> Builder
Name the thread-to-be. Currently the name is used for identification only in panic messages.
fn named<T: IntoCow<'static, String, str>>(self, name: T) -> Builder
Deprecated: use name
instead
fn stack_size(self, size: uint) -> Builder
Set the size of the stack for the new thread.
fn stdout(self, stdout: Box<Writer + Send>) -> Builder
Redirect thread-local stdout.
fn stderr(self, stderr: Box<Writer + Send>) -> Builder
Redirect thread-local stderr.
fn spawn<T, F>(self, f: F) -> JoinGuard<T> where T: Send, F: FnOnce() -> T, F: Send
Spawn a new joinable thread, and return a JoinGuard guard for it.
See Thead::spawn
and the module doc for more details.