std::condition_variable_any
Da cppreference.com.
![]() | Questa pagina è stata tradotta in modo automatico dalla versione in ineglese della wiki usando Google Translate. La traduzione potrebbe contenere errori e termini strani. Muovi il puntatore sopra al testo per vedere la versione originale. Puoi aiutarci a correggere gli gli errori. Per ulteriori istruzioni clicca qui. |
Elemento definito nell'header <condition_variable> | ||
class condition_variable_any; | (dal C++11) | |
La classe
condition_variable_any
è una generalizzazione di std::condition_variable. Considerando che std::condition_variable funziona solo su std::unique_lock<std::mutex>, condition_variable_any
può operare su qualsiasi definita dall'utente blocco che soddisfi i requisiti 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
fornisce funzionalità simili a std::condition_variable. È una primitiva di sincronizzazione che può essere utilizzato per bloccare un certo numero di fili fino: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.
- una notifica viene ricevuta da un altro 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 timeout scade, oOriginal: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 wakeup spurie verificaOriginal:a wakeup spurie occursThe text has been machine-translated via Google Translate.
You can help to correct and verify the translation. Click here for instructions.
Qualsiasi thread che intende aspettare
std::condition_variable_any
deve acquisire un blocco prima. Le operazioni di attesa atomicamente rilasciare il blocco e sospendere l'esecuzione del thread. Quando la variabile di condizione è notificato, il thread viene risvegliato, e la serratura viene riacquisito.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.
Il
std::condition_variable_any
classe è uno standard-layout della classe. Non è copia-costruibile, move-costruibile, copy-assegnabile, o spostare assegnabile.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 il blocco è std::unique_lock, std::condition_variable può fornire prestazioni migliori.
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.
[modifica]Membri funzioni
Costruisce l'oggetto 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. (metodo pubblico) | |
distrugge l'oggetto 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. (metodo pubblico) | |
operator= [cancellato] | non copia-assegnabile 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. (metodo pubblico) |
Original: Notification The text has been machine-translated via Google Translate. You can help to correct and verify the translation. Click here for instructions. | |
segnala un thread in attesa 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. (metodo pubblico) | |
informa tutti i thread in attesa 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. (metodo pubblico) | |
Original: Waiting The text has been machine-translated via Google Translate. You can help to correct and verify the translation. Click here for instructions. | |
blocca il thread corrente fino a quando la variabile di condizione è svegliato 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. (metodo pubblico) | |
Blocca il thread corrente fino a quando la variabile di condizione è svegliato o dopo la durata del timeout specificato 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. (metodo pubblico) | |
blocca il thread corrente fino a quando la variabile di condizione è svegliato o fino a che punto nel tempo specificato è stato raggiunto 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. (metodo pubblico) |