名前空間
変種

std::condition_variable_any

提供: cppreference.com
2013年7月2日 (火) 23:04時点におけるP12bot (トーク | 投稿記録)による版 (Use {{lc}}. Update links. Various fixes.)

<metanoindex/>

 
 
スレッドサポートライブラリ
スレッド
(C++11)
(C++20)
(C++20)
this_thread 名前空間
(C++11)
(C++11)
(C++11)
相互排他
(C++11)
汎用ロック管理
(C++11)
(C++11)
(C++11)
(C++11)(C++11)(C++11)
(C++11)
(C++11)
条件変数
(C++11)
セマフォ
ラッチとバリア
(C++20)
(C++20)
フューチャー
(C++11)
(C++11)
(C++11)
(C++11)
 
 
<tbody> </tbody>
ヘッダ <condition_variable> で定義
class condition_variable_any;
(C++11以上)
condition_variable_anyクラスはstd::condition_variableの一般化である。 std::condition_variableだけstd::unique_lock<std::mutex>上で動作するのに対し、condition_variable_anyBasicLockable要件を満たす任意のユーザー定義のロックを操作することができます.
Original:
The condition_variable_any class is a generalization of std::condition_variable. Whereas std::condition_variable works only on std::unique_lock<std::mutex>, condition_variable_any can operate on any user-defined lock that meets the BasicLockable requirements.
The text has been machine-translated via Google Translate.
You can help to correct and verify the translation. Click here for instructions.
condition_variable_anystd::condition_variableと同様の機能を提供します。 :それはするまでスレッドのいくつかの番号をブロックするために使用することができます同期プリミティブです
Original:
condition_variable_any provides similar functionality to std::condition_variable. It is a synchronization primitive that can be used to block some number of threads until:
The text has been machine-translated via Google Translate.
You can help to correct and verify the translation. Click here for instructions.
  • 通知は、別のスレッドから受信されます
    Original:
    a notification is received from another thread
    The text has been machine-translated via Google Translate.
    You can help to correct and verify the translation. Click here for instructions.
  • タイムアウトが満了した場合、
    Original:
    a timeout expires, or
    The text has been machine-translated via Google Translate.
    You can help to correct and verify the translation. Click here for instructions.
  • スプリアスウェイクアップが発生します
    Original:
    The text has been machine-translated via Google Translate.
    You can help to correct and verify the translation. Click here for instructions.
std::condition_variable_anyで待機しようとするスレッドは、最初にロックを取得する必要があります。待機操作がアトミックにロックを解放し、スレッドの実行を中断します。条件変数が通知されると、スレッドが起こされ、ロックが再取得される.
Original:
Any thread that intends to wait on std::condition_variable_any has to acquire a lock first. The wait operations atomically release the lock and suspend the execution of the thread. When the condition variable is notified, the thread is awakened, and the lock is reacquired.
The text has been machine-translated via Google Translate.
You can help to correct and verify the translation. Click here for instructions.
クラスstd::condition_variable_anyは、標準的なレイアウトクラスです。それは、コピーコンストラクト可能入居コンストラクト、コピーアサイナブル、またはムーブ代入できません.
Original:
The class std::condition_variable_any is a standard-layout class. It is not copy-constructible, move-constructible, copy-assignable, or move-assignable.
The text has been machine-translated via Google Translate.
You can help to correct and verify the translation. Click here for instructions.
ロックがstd::unique_lockある場合、std::condition_variableは、より良い性能を提供することがあり.
Original:
If the lock is std::unique_lock, std::condition_variable may provide better performance.
The text has been machine-translated via Google Translate.
You can help to correct and verify the translation. Click here for instructions.

メンバ関数

オブジェクトを構築します
(パブリックメンバ関数) [edit]
オブジェクトを破棄します
(パブリックメンバ関数) [edit]
operator=
[削除]
コピー代入可能ではありません
(パブリックメンバ関数) [edit]
通知
Original:
Notification
The text has been machine-translated via Google Translate.
You can help to correct and verify the translation. Click here for instructions.
待機中のスレッドひとつに通知します
(パブリックメンバ関数) [edit]
待機中のスレッドすべてに通知します
(パブリックメンバ関数) [edit]
待っています
Original:
Waiting
The text has been machine-translated via Google Translate.
You can help to correct and verify the translation. Click here for instructions.
条件変数が通知されるまで現在のスレッドをブロックします
(パブリックメンバ関数) [edit]
条件変数が通知されるか指定時間が経過するまで現在のスレッドをブロックします
(パブリックメンバ関数) [edit]
条件変数が通知されるか指定時点に達するまで現在のスレッドをブロックします
(パブリックメンバ関数) [edit]