[−][src]Struct sunrise_libuser::threads::Thread
Libuser's representation of a thread.
This is the low-level representation of a thread, kind to pthread_t
on Unix.
You can create and start a thread from its Thread
structure.
A Thread
detaches (read "leak resources of") the associated thread when it is dropped,
which means that there is no longer any handle to thread and no way to join on it.
Internally owns the ThreadContext for this thread, including its stack.
Implementations
impl Thread
[src]
pub fn start(&self) -> Result<(), Error>
[src]
Start this thread.
pub fn join(&self) -> Result<(), Error>
[src]
Wait for the thread to exit.
pub fn create(
entry: fn(_: usize),
arg: usize,
stack_size: usize
) -> Result<Self, Error>
[src]
entry: fn(_: usize),
arg: usize,
stack_size: usize
) -> Result<Self, Error>
Allocates resources for a thread. To start it, call start
.
Allocates the stack, sets up the context and TLS, and calls svcCreateThread
.
pub fn as_thread_ref(&self) -> &ThreadHandle
[src]
Get the underlying thread handle.
Trait Implementations
Auto Trait Implementations
impl !RefUnwindSafe for Thread
impl Send for Thread
impl Sync for Thread
impl Unpin for Thread
impl UnwindSafe for Thread
Blanket Implementations
impl<T> Any for T where
T: 'static + ?Sized,
[src]
T: 'static + ?Sized,
impl<T> Borrow<T> for T where
T: ?Sized,
[src]
T: ?Sized,
impl<T> BorrowMut<T> for T where
T: ?Sized,
[src]
T: ?Sized,
fn borrow_mut(&mut self) -> &mut T
[src]
impl<T> From<T> for T
[src]
impl<T, U> Into<U> for T where
U: From<T>,
[src]
U: From<T>,
impl<T> SizedIPCBuffer for T
[src]
fn size(&Self) -> usize
[src]
fn is_cool(usize, usize) -> bool
[src]
unsafe fn from_raw_parts<'a>(usize, usize) -> &'a T
[src]
unsafe fn from_raw_parts_mut<'a>(usize, usize) -> &'a mut T
[src]
impl<T, U> TryFrom<U> for T where
U: Into<T>,
[src]
U: Into<T>,
type Error = Infallible
The type returned in the event of a conversion error.
fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>
[src]
impl<T, U> TryInto<U> for T where
U: TryFrom<T>,
[src]
U: TryFrom<T>,