nlib
Thread.h File Reference

Defines the thread. More...

#include "nn/nlib/Config.h"
#include "nn/nlib/Swap.h"
#include "nn/nlib/UniquePtr.h"
#include "nn/nlib/TypeTraits.h"
#include "nn/nlib/DateTime.h"

Go to the source code of this file.

Classes

struct  nn::nlib::threading::ThreadSettings
 The class to wrap nlib_thread_attr. nlib_thread_attr_init() and nlib_thread_attr_destroy() are run automatically as required. More...
 
struct  nn::nlib::threading::ThreadArg< T1, T2, T3, T4, T5 >
 Structure to run a thread in a Thread class. More...
 
class  nn::nlib::threading::Thread
 Class to create and start threads. More...
 

Namespaces

 nn::nlib
 Implements common features and features that are highly platform-dependent. Also refer to nlib Platform APIs. nlib_ns is an alias.
 
 nn::nlib::threading
 Unicode related functionality is implemented.
 
 nn::nlib::threading::this_thread
 Implements functions related to current thread behavior.
 

Functions

size_t nn::nlib::threading::GetHardwareConcurrency () noexcept
 Returns the number of hardware threads. More...
 
errno_t nn::nlib::threading::this_thread::YieldThread () noexcept
 Yields control to a different thread. More...
 
errno_t nn::nlib::threading::this_thread::Sleep (const TimeSpan &span) noexcept
 Makes the thread sleep for a specified period of time. More...
 
errno_t nn::nlib::threading::this_thread::SleepMilliSeconds (unsigned int millisec) noexcept
 Makes the thread sleep for a specified period of time. More...
 
nlib_thread_id nn::nlib::threading::this_thread::GetId () noexcept
 Gets the current thread ID. More...
 
errno_t nn::nlib::threading::this_thread::GetCpu (int *cpuid) noexcept
 Gets the CPU on which the called thread is executing. More...
 
errno_t nn::nlib::threading::this_thread::SetName (const char *literalString) noexcept
 Attaches a name to the thread. More...
 
errno_t nn::nlib::threading::this_thread::GetPriority (int32_t *priority) noexcept
 Calls nlib_thread_getpriority and gets the thread's execution priority.
 
errno_t nn::nlib::threading::this_thread::ChangePriority (int32_t priority) noexcept
 Calls nlib_thread_setpriority and sets the thread's execution priority.
 

Detailed Description

Defines the thread.

Definition in file Thread.h.