std::condition_variable_any
De cppreference.com
<metanoindex/>
<tbody> </tbody>| Definido no cabeçalho <condition_variable>
|
||
class condition_variable_any; |
(desde C++11) | |
A classe
condition_variable_any é uma generalização do std::condition_variable. Considerando std::condition_variable só funciona em std::unique_lock<std::mutex>, condition_variable_any pode operar em qualquer bloqueio definido pelo usuário que atende aos requisitos 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 fornece funcionalidade semelhante à std::condition_variable. É um primitivo de sincronização que pode ser utilizado para bloquear um certo número de fios até: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.
- uma notificação for recebida de outro segmentoOriginal: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. - um tempo limite expirar, 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. - um wakeup espúria ocorreOriginal:a wakeup espúria occursThe text has been machine-translated via Google Translate.
You can help to correct and verify the translation. Click here for instructions.
Qualquer segmento que pretende esperar
std::condition_variable_any tem de adquirir um primeiro bloqueio. As operações de espera atomicamente liberar o bloqueio e suspender a execução da rosca. Quando a variável de condição é notificado, o fio é despertada, e que o bloqueio seja readquirida.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.
O
std::condition_variable_any classe é uma classe padrão de layout. Não é cópia constructible, mover-constructible, cópia de cessão, ou mover-atribuível.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.
Se o bloqueio é std::unique_lock, std::condition_variable pode proporcionar um melhor desempenho.
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.
