std::condition_variable_any
De 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. |
<metanoindex/>
<tbody> </tbody>| Dclar dans l'en-tte <condition_variable>
|
||
class condition_variable_any; |
(depuis C++11) | |
La classe
condition_variable_any est une gnralisation de std::condition_variable. Alors que std::condition_variable ne fonctionne que sur std::unique_lock<std::mutex>, condition_variable_any peut fonctionner sur n'importe quelle serrure dfinie par l'utilisateur qui rpond aux exigences 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_any fournit des fonctionnalits similaires std::condition_variable. Il s'agit d'une primitive de synchronisation qui peut tre utilis pour bloquer un certain nombre de fils jusqu' ce que: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.
- une notification est reue d'un autre threadOriginal: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. - un dlai expire, ouOriginal: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. - un rveil faux se produitOriginal:a rveil faux occursThe text has been machine-translated via Google Translate.
You can help to correct and verify the translation. Click here for instructions.
Tout thread qui a l'intention d'attendre le
std::condition_variable_any doit acqurir un premier verrou. Les oprations d'attente atomique librer le verrou et de suspendre l'excution du thread. Lorsque la variable de condition est notifi, le thread est rveill, et la serrure est acquise de nouveau .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.
Le
std::condition_variable_any classe est une classe standard de prsentation. Ce n'est pas la copie constructible, mouvement constructible, copy-cessible, ou dplacer cessible .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.
Si le verrou est std::unique_lock, std::condition_variable peut offrir de meilleures performances .
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.
Fonctions membres
Construit l'objet 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. (fonction membre publique) | |
Dtruit l'objet 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. (fonction membre publique) | |
operator= [ supprime ]Original: deleted The text has been machine-translated via Google Translate. You can help to correct and verify the translation. Click here for instructions. |
pas de copier-cessible 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. (fonction membre publique) |
Original: Notification The text has been machine-translated via Google Translate. You can help to correct and verify the translation. Click here for instructions. | |
Notifie un thread en attente 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. (fonction membre publique) | |
Notifie tous les threads en attente 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. (fonction membre publique) | |
Original: Waiting The text has been machine-translated via Google Translate. You can help to correct and verify the translation. Click here for instructions. | |
Bloque le thread actuel jusqu' ce que la condition_variable soit rveille 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. (fonction membre publique) | |
Bloque le thread actuel jusqu' ce que la condition_variable soit rveille ou que la dure de temporisation spcifie soit coule 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. (fonction membre publique) | |
Bloque le thread en cours jusqu' ce que la condition_variable soit rveille ou jusqu' ce que le point temporel (time point) spcifi soit atteint 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. (fonction membre publique) | |