pub struct Thread {
id: pthread_t,
}
Fields§
§id: pthread_t
Implementations§
Source§impl Thread
impl Thread
pub unsafe fn new( stack: usize, name: Option<&str>, f: Box<dyn FnOnce()>, ) -> Result<Thread>
pub fn yield_now()
pub fn set_name(name: &CStr)
pub fn sleep(dur: Duration)
pub fn sleep_until(deadline: Instant)
pub fn join(self)
pub fn id(&self) -> pthread_t
pub fn into_id(self) -> pthread_t
Trait Implementations§
Source§impl<T> IntoInner<Thread> for JoinHandle<T>
impl<T> IntoInner<Thread> for JoinHandle<T>
fn into_inner(self) -> Thread
impl Send for Thread
impl Sync for Thread
Auto Trait Implementations§
impl Freeze for Thread
impl RefUnwindSafe for Thread
impl Unpin for Thread
impl UnwindSafe for Thread
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more
Source§impl<T> SizedTypeProperties for T
impl<T> SizedTypeProperties for T
Source§#[doc(hidden)] const IS_ZST: bool = _
#[doc(hidden)] const IS_ZST: bool = _
🔬This is a nightly-only experimental API. (
sized_type_properties
)Source§#[doc(hidden)] const LAYOUT: Layout = _
#[doc(hidden)] const LAYOUT: Layout = _
🔬This is a nightly-only experimental API. (
sized_type_properties
)Source§#[doc(hidden)] const MAX_SLICE_LEN: usize = _
#[doc(hidden)] const MAX_SLICE_LEN: usize = _
🔬This is a nightly-only experimental API. (
sized_type_properties
)The largest safe length for a
[Self]
. Read more