Thread class. More...
|Thread ID. More...|
|Default constructor. |
|thread (void(*aFunction)(void *), void *aArg)|
|Thread starting constructor. |
|Wait for the thread to finish (join execution flows). |
|bool||joinable () const|
|Check if the thread is joinable. |
|Detach from the thread. |
|id||get_id () const|
|Return the thread ID of a thread object. |
|Get the native handle for this thread. |
|static unsigned||hardware_concurrency ()|
|Determine the number of threads which can possibly execute concurrently. |
thread object without an associated thread of execution (i.e. non-joinable).
Thread starting constructor.
thread object with a new thread of execution.
|[in]||aFunction||A function pointer to a function of type: |
|[in]||aArg||Argument to the thread function.|
std::terminate()will be called, which terminates the process. It is always wise to do
join()before deleting a thread object.
Detach from the thread.
detach(), the thread object is no longer assicated with a thread of execution (i.e. it is not joinable). The thread continues execution without the calling thread blocking, and when the thread ends execution, any owned resources are released.
|static unsigned hardware_concurrency||(||)||
Determine the number of threads which can possibly execute concurrently.
This function is useful for determining the optimal number of threads to use for a task.
Wait for the thread to finish (join execution flows).
join(), the thread object is no longer associated with a thread of execution (i.e. it is not joinable, and you may not join with it nor detach from it).
Check if the thread is joinable.
A thread object is joinable if it has an associated thread of execution.
Get the native handle for this thread.
HANDLE, and under POSIX systems, this is a