doc.rust-lang.org
pub fn new() -> Builder
Generates the base configuration for spawning a thread, from which configuration methods can be chained.
associated_function
std
Stable since 1.0.0
Version 1.100.0-nightly
doc.rust-lang.org
pub fn name(self, name: String) -> Builder
Names the thread-to-be. Currently the name is used for identification only in panic messages.
method
std
Stable since 1.0.0
Version 1.100.0-nightly
doc.rust-lang.org
pub struct Builder
Thread factory, which can be used in order to configure the properties of a new thread.
struct
std
Stable since 1.0.0
Version 1.100.0-nightly
doc.rust-lang.org
pub type Result<T> = crate::result::Result<T, Box<dyn Any + Send + 'static>>
A specialized Result type for threads.
type_alias
std
Stable since 1.0.0
Version 1.100.0-nightly
doc.rust-lang.org
pub mod thread
Native threads.
module
std
Stable since 1.0.0
Version 1.100.0-nightly
doc.rust-lang.org
pub mod task
Types and Traits for working with asynchronous tasks.
module
std
Stable since 1.36.0
Version 1.100.0-nightly
doc.rust-lang.org
pub fn futex_wake_all(futex: &crate::sync::atomic::Atomic<u32>)
Wakes up all threads that are waiting on futex_wait on this futex.
function
std
Version 1.100.0-nightly
doc.rust-lang.org
pub fn futex_wake(futex: &crate::sync::atomic::Atomic<u32>) -> bool
Wakes up one thread that's blocked on futex_wait on this futex.
function
std
Version 1.100.0-nightly
doc.rust-lang.org
pub fn futex_wait(futex: &crate::sync::atomic::Atomic<u32>, expected: u32, timeout: Option<crate::time::Duration>) -> bool
Waits for a futex_wake operation to wake us.
function
std
Version 1.100.0-nightly
doc.rust-lang.org
pub type SmallPrimitive = u32
Must be the underlying type of SmallFutex
type_alias
std
Version 1.100.0-nightly
doc.rust-lang.org
pub type SmallFutex = crate::sync::atomic::Atomic<u32>
An atomic for use as a futex that is at least 8-bits but may be larger.
type_alias
std
Version 1.100.0-nightly
doc.rust-lang.org
pub type Primitive = u32
Must be the underlying type of Futex
type_alias
std
Version 1.100.0-nightly
doc.rust-lang.org
pub type Futex = crate::sync::atomic::Atomic<u32>
An atomic for use as a futex that is at least 32-bits but may be larger
type_alias
std
Version 1.100.0-nightly
doc.rust-lang.org
pub struct Process
The unique ID of the process (this should never be negative).
struct
std
Version 1.100.0-nightly
doc.rust-lang.org
pub struct ExitStatus
Unix exit statuses
struct
std
Version 1.100.0-nightly
doc.rust-lang.org
pub struct CStringIter<'a>
An iterator over all CStrs contained in a CStringArray.
struct
std
Version 1.100.0-nightly
doc.rust-lang.org
pub fn write(&mut self, index: usize, item: CString)
Replace the string at position index.
method
std
Version 1.100.0-nightly
doc.rust-lang.org
pub fn with_capacity(capacity: usize) -> Self
Creates a new CStringArray with enough capacity to hold capacity strings.
associated_function
std
Version 1.100.0-nightly
doc.rust-lang.org
pub fn push(&mut self, item: CString)
Push an additional string to the array.
method
std
Version 1.100.0-nightly
doc.rust-lang.org
pub fn iter(&self) -> CStringIter<'_>
Returns an iterator over all CStrs contained in this array.
method
std
Version 1.100.0-nightly