Available on crate feature
thread only.Expand description
Thread spawning, joining, and detaching.
Structs§
- NSTD
Thread - Represents a running thread.
- NSTD
Thread Descriptor - Describes the creation of a new thread.
- NSTD
Thread Handle - A handle to a running thread.
- NSTD
ThreadID - A thread’s unique identifier.
Functions§
- nstd_
thread_ count - Returns the number of recommended threads that a program should use.
- nstd_
thread_ current - Returns a handle to the calling thread.
- nstd_
thread_ detach - Detaches a thread from it’s handle, allowing it to run in the background.
- nstd_
thread_ handle - Retrieves a raw handle to a thread.
- nstd_
thread_ handle_ free - Frees an instance of
NSTDThreadHandle. - nstd_
thread_ id - Returns a thread’s unique identifier.
- nstd_
thread_ id_ compare - Compares two thread identifiers.
- nstd_
thread_ id_ free - Frees an instance of
NSTDThreadID. - nstd_
thread_ is_ finished - Checks if a thread has finished running.
- nstd_
thread_ is_ panicking - Checks if the current thread is unwinding due to a panic.
- nstd_
thread_ ⚠join - Joins a thread by it’s handle.
- nstd_
thread_ name - Returns the name of a thread.
- nstd_
thread_ sleep - Puts the current thread to sleep for a specified duration.
- nstd_
thread_ ⚠spawn - Spawns a new thread executing the function
thread_fnand returns a handle to the new thread.
Type Aliases§
- NSTD
Optional Thread - Represents an optional value of type
NSTDThread. - NSTD
Optional Thread Result - Returned from
nstd_thread_join, contains the thread function’s return value on success. - NSTD
Thread Count Result - Returned from
nstd_thread_count, contains the number of threads detected on the system on success. - NSTD
Thread Result - A thread function’s return value.