nlib
Thread.h ファイル

スレッドの定義を行なっています。 [詳解]

#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"

[ソースコード]

クラス

struct  nn::nlib::threading::ThreadSettings
 nlib_thread_attrをラップするクラスです。必要に応じて自動的にnlib_thread_attr_init()nlib_thread_attr_destroy()が実行されます。 [詳解]
 
struct  nn::nlib::threading::ThreadArg< T1, T2, T3, T4, T5 >
 Threadクラスでスレッドを実行するために利用できる構造体です。 [詳解]
 
class  nn::nlib::threading::Thread
 スレッドの生成・開始を行うためのクラスです。 [詳解]
 

名前空間

 nn::nlib
 共通して使われる機能やプラットフォームへの依存度が高い機能が実装されます。 nlib Platform APIs も御覧ください。nlib_nsはエイリアスです。
 
 nn::nlib::threading
 スレッド関連のクラスや関数が実装されています。
 
 nn::nlib::threading::this_thread
 カレントスレッドの動作に関係する関数が実装されています。
 

関数

size_t nn::nlib::threading::GetHardwareConcurrency () noexcept
 ハードウェアスレッドの数を返します。 [詳解]
 
errno_t nn::nlib::threading::this_thread::YieldThread () noexcept
 他のスレッドに制御を譲ります。 [詳解]
 
errno_t nn::nlib::threading::this_thread::Sleep (const TimeSpan &span) noexcept
 スリープします。 [詳解]
 
errno_t nn::nlib::threading::this_thread::SleepMilliSeconds (unsigned int millisec) noexcept
 スリープします。 [詳解]
 
nlib_thread_id nn::nlib::threading::this_thread::GetId () noexcept
 カレントスレッドのIDを取得します。 [詳解]
 
errno_t nn::nlib::threading::this_thread::GetCpu (int *cpuid) noexcept
 呼び出したスレッドが実行されているCPUを取得します。 [詳解]
 
errno_t nn::nlib::threading::this_thread::SetName (const char *literalString) noexcept
 スレッドに名前をつけます。 [詳解]
 
errno_t nn::nlib::threading::this_thread::GetPriority (int32_t *priority) noexcept
 nlib_thread_getpriority()を呼び出して、スレッドの実行優先順位を取得します。
 
errno_t nn::nlib::threading::this_thread::ChangePriority (int32_t priority) noexcept
 nlib_thread_setpriority()を呼び出して、スレッドの実行優先順位を設定します。
 

詳解

スレッドの定義を行なっています。

Thread.h に定義があります。