std::condition_variable_any
提供:cppreference.com
|
|
This page has been machine-translated from the English version of the wiki using Google Translate.
The translation may contain errors and awkward wording. Hover over text to see the original version. You can help to fix errors and improve the translation. For instructions click here. |
| Defined in header <condition_variable>
|
||
| class condition_variable_any; |
(C + + 11以来) | |
condition_variable_anyクラスはstd::condition_variableの一般化である。 std::condition_variableだけstd::unique_lock<std::mutex>上で動作するのに対し、condition_variable_anyはBasicLockable要件を満たす任意のユーザー定義のロックを操作することができます.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.
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.
You can help to correct and verify the translation. Click here for instructions.
- 通知は、別のスレッドから受信されますOriginal:a notification is received from another threadThe 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, orThe text has been machine-translated via Google Translate.
You can help to correct and verify the translation. Click here for instructions. - スプリアスウェイクアップが発生しますOriginal:a スプリアスウェイクアップ occursThe 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.
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.
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.
You can help to correct and verify the translation. Click here for instructions.
[編集] メンバ関数
| オブジェクトを作成します Original: constructs the object The text has been machine-translated via Google Translate. You can help to correct and verify the translation. Click here for instructions. (パブリックメンバ関数) | |
| オブジェクトを破棄します Original: destructs the object The text has been machine-translated via Google Translate. You can help to correct and verify the translation. Click here for instructions. (パブリックメンバ関数) | |
| operator= [削除された] |
コピーではなくアサイン可能 Original: not copy-assignable The text has been machine-translated via Google Translate. You can help to correct and verify the translation. Click here for instructions. (パブリックメンバ関数) |
Original: Notification The text has been machine-translated via Google Translate. You can help to correct and verify the translation. Click here for instructions. | |
| 1待機中のスレッドに通知します Original: notifies one waiting thread The text has been machine-translated via Google Translate. You can help to correct and verify the translation. Click here for instructions. (パブリックメンバ関数) | |
| 待機中のすべてのスレッドに通知します Original: notifies all waiting threads The text has been machine-translated via Google Translate. You can help to correct and verify the translation. Click here for instructions. (パブリックメンバ関数) | |
Original: Waiting The text has been machine-translated via Google Translate. You can help to correct and verify the translation. Click here for instructions. | |
| 条件変数はウェイクアップされるまで、現在のスレッドをブロックします Original: blocks the current thread until the condition variable is woken up The text has been machine-translated via Google Translate. You can help to correct and verify the translation. Click here for instructions. (パブリックメンバ関数) | |
| 現在のスレッドのブロックを条件変数が目覚めたり、指定されたタイムアウト期間の後にされるまで Original: blocks the current thread until the condition variable is woken up or after the specified timeout duration The text has been machine-translated via Google Translate. You can help to correct and verify the translation. Click here for instructions. (パブリックメンバ関数) | |
| 条件変数はウェイクアップされるまで、または指定された時点に達するまで、現在のスレッドをブロックします Original: blocks the current thread until the condition variable is woken up or until specified time point has been reached The text has been machine-translated via Google Translate. You can help to correct and verify the translation. Click here for instructions. (パブリックメンバ関数) | |