Espacios de nombres
Variantes
Acciones

std::condition_variable_any

De cppreference.com
< cpp‎ | thread

 
 
Tema Biblioteca de ayuda
Threads
Original:
Threads
The text has been machine-translated via Google Translate.
You can help to correct and verify the translation. Click here for instructions.
(C++11)
this_thread espacio de nombres
Original:
this_thread namespace
The text has been machine-translated via Google Translate.
You can help to correct and verify the translation. Click here for instructions.
(C++11)
(C++11)
(C++11)
Exclusión mutua
Original:
Mutual exclusion
The text has been machine-translated via Google Translate.
You can help to correct and verify the translation. Click here for instructions.
(C++11)
Gestión de bloqueos genérico
Original:
Generic lock management
The text has been machine-translated via Google Translate.
You can help to correct and verify the translation. Click here for instructions.
(C++11)
(C++11)
(C++11)
(C++11)(C++11)(C++11)
Las variables de condición
Original:
Condition variables
The text has been machine-translated via Google Translate.
You can help to correct and verify the translation. Click here for instructions.
condition_variable_any
(C++11)
(C++11)
Futuros
Original:
Futures
The text has been machine-translated via Google Translate.
You can help to correct and verify the translation. Click here for instructions.
(C++11)
(C++11)
(C++11)
(C++11)
 
std::condition_variable_any
Las funciones miembro
Original:
Member functions
The text has been machine-translated via Google Translate.
You can help to correct and verify the translation. Click here for instructions.
Notificación
Original:
Notification
The text has been machine-translated via Google Translate.
You can help to correct and verify the translation. Click here for instructions.
Espera
Original:
Waiting
The text has been machine-translated via Google Translate.
You can help to correct and verify the translation. Click here for instructions.
 
Definido en la cabecera <condition_variable>
class condition_variable_any;
(desde C++11)
La clase condition_variable_any es una generalización de std::condition_variable. Considerando que std::condition_variable sólo funciona en std::unique_lock<std::mutex>, condition_variable_any puede operar en cualquier bloqueo definida por el usuario que cumpla los 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.
condition_variable_any proporciona una funcionalidad similar a std::condition_variable. Es una primitiva de sincronización que se puede utilizar para bloquear un cierto número de hilos hasta 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.
  • se recibe una notificación de otro hilo
    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.
  • un tiempo de espera, o
    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.
  • un activación espuria se produce
    Original:
    The text has been machine-translated via Google Translate.
    You can help to correct and verify the translation. Click here for instructions.
Cualquier hilo que tiene la intención de esperar en std::condition_variable_any tiene que adquirir un bloqueo en primer lugar. Las operaciones de espera atómicamente liberar el bloqueo y la suspensión de la ejecución del hilo. Cuando la variable de estado se notifica, el hilo se despertó y volvió a adquirir el bloqueo está .
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.
El std::condition_variable_any clase es una clase de normas de diseño. No es copy-construible, mover construible, asignable anti-copia, o asignable movimiento .
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.
Si el bloqueo está std::unique_lock, std::condition_variable puede proporcionar mejor rendimiento .
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.

[editar] Las funciones miembro

Construye el objeto
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.

(función miembro público) [editar]
destructs el objeto
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.

(función miembro público) [editar]
operator=
[eliminada]
no copia-asignable
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.

(función miembro público) [editar]
Notificación
Original:
Notification
The text has been machine-translated via Google Translate.
You can help to correct and verify the translation. Click here for instructions.
notifica un subproceso en espera
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.

(función miembro público) [editar]
notifica a todos los subprocesos en espera
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.

(función miembro público) [editar]
Espera
Original:
Waiting
The text has been machine-translated via Google Translate.
You can help to correct and verify the translation. Click here for instructions.
Bloquea el subproceso actual hasta que la variable condición es despertado
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.

(función miembro público) [editar]
Bloquea el subproceso actual hasta que la variable condición es despertado o después del tiempo de espera especificado
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.

(función miembro público) [editar]
Bloquea el subproceso actual hasta que la variable condición es despertado o hasta que punto se especifica el tiempo ha sido alcanzada
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.

(función miembro público) [editar]