Espacios de nombres
Variantes
Acciones

Thread support library

De cppreference.com
< cpp
 
 
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.
thread(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.
get_id(C++11)
yield(C++11)
sleep_for(C++11)
sleep_until(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.
mutex(C++11)
timed_mutex(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.
lock_guard(C++11)
unique_lock(C++11)
defer_lock_t
try_to_lock_t
adopt_lock_t
(C++11)
(C++11)
(C++11)
lock(C++11)
try_lock(C++11)
defer_lock
try_to_lock
adopt_lock
(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(C++11)
condition_variable_any(C++11)
notify_all_at_thread_exit(C++11)
cv_status(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.
promise(C++11)
future(C++11)
shared_future(C++11)
packaged_task(C++11)
async(C++11)
launch(C++11)
future_status(C++11)
future_error(C++11)
future_category(C++11)
future_errc(C++11)
 

C++ incluye soporte para threads (hilos), exclusión mutua, variables de condición y futuros.

Contenido

[editar] Threads (hilos)

Los hilos permiten a los progamas ejecutar varias ejecuciones en paralelo. Permitiendo así aprovechar los núcleos de un procesador.

Defined in header <thread>
(C++11)
gestiona un subproceso independiente
Original:
manages a separate thread
The text has been machine-translated via Google Translate.
You can help to correct and verify the translation. Click here for instructions.

(clase) [edit]
Funciones aplicables al hilo actual
Defined in namespace this_thread
(C++11)
sugiere a la implementación que ejecute otro hilo (en el caso que haya más hilos que núcleos)
(función) [edit]
(C++11)
devuelve el ID del tema del hilo actual
Original:
returns the thread id of the current 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) [edit]
(C++11)
detiene la ejecución del subproceso actual durante una duración de tiempo especificado
Original:
stops the execution of the current thread for a specified time 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) [edit]
stops the execution of the current thread until a specified time point
(función) [edit]

[editar] Exclusión mutua

Los algoritmos de exclusión mutua permite a varios hilos protegerse del acceso simultaneo a recursos compartidos. Esto permite evitar corrupciones de datos y proporciona bases para la sincronización entre hilos.

Defined in header <mutex>
(C++11)
ofrece instalaciones básicas exclusión mutua
Original:
provides basic mutual exclusion facility
The text has been machine-translated via Google Translate.
You can help to correct and verify the translation. Click here for instructions.

(clase) [edit]
proporciona la facilidad de exclusión mutua que implementa el bloqueo con un tiempo de espera
Original:
provides mutual exclusion facility which implements locking with a timeout
The text has been machine-translated via Google Translate.
You can help to correct and verify the translation. Click here for instructions.

(clase) [edit]
proporciona la facilidad de exclusión mutua que se puede cerrar de forma recursiva por el mismo hilo
Original:
provides mutual exclusion facility which can be locked recursively by the same thread
The text has been machine-translated via Google Translate.
You can help to correct and verify the translation. Click here for instructions.

(clase) [edit]
proporciona la facilidad de exclusión mutua que puede ser bloqueado recursively
por el mismo hilo y los implementos de bloqueo con un tiempo de espera
Original:
provides mutual exclusion facility which can be locked recursively
by the same thread and implements locking with a timeout
The text has been machine-translated via Google Translate.
You can help to correct and verify the translation. Click here for instructions.

(clase) [edit]
Generic mutex management
implementa un contenedor mutex propiedad estrictamente basada en ámbito
Original:
implements a strictly scope-based mutex ownership wrapper
The text has been machine-translated via Google Translate.
You can help to correct and verify the translation. Click here for instructions.

(clase de plantilla) [edit]
implementa la propiedad mueble contenedor mutex
Original:
implements movable mutex ownership wrapper
The text has been machine-translated via Google Translate.
You can help to correct and verify the translation. Click here for instructions.

(clase de plantilla) [edit]
tipo de variable se utiliza para especificar la estrategia de bloqueo
Original:
tag type used to specify locking strategy
The text has been machine-translated via Google Translate.
You can help to correct and verify the translation. Click here for instructions.

(clase) [edit]
constantes de etiqueta se utiliza para especificar la estrategia de bloqueo
Original:
tag constants used to specify locking strategy
The text has been machine-translated via Google Translate.
You can help to correct and verify the translation. Click here for instructions.

(constante) [edit]
Generic locking algorithms
(C++11)
las gestiones para obtener la propiedad de las exclusiones mutuas a través de llamadas repetidas a try_lock
Original:
attempts to obtain ownership of mutexes via repeated calls to try_lock
The text has been machine-translated via Google Translate.
You can help to correct and verify the translation. Click here for instructions.

(función de plantilla) [edit]
(C++11)
bloquea especificados exclusiones mutuas bloques si hay alguno disponible
Original:
locks specified mutexes, blocks if any are unavailable
The text has been machine-translated via Google Translate.
You can help to correct and verify the translation. Click here for instructions.

(función de plantilla) [edit]
Llame a la vez
Original:
Call once
The text has been machine-translated via Google Translate.
You can help to correct and verify the translation. Click here for instructions.
(C++11)
objeto de ayuda para asegurarse de que call_once invoca la función de una sola vez
Original:
helper object to ensure that call_once invokes the function only once
The text has been machine-translated via Google Translate.
You can help to correct and verify the translation. Click here for instructions.

(clase) [edit]
(C++11)
invoca una función de una sola vez, incluso si se llama desde varios subprocesos
Original:
invokes a function only once even if called from multiple 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 de plantilla) [edit]

[editar] Las variables de condición

Una variable de condición es un objeto de sincronización que facilita que múltiples hilos puedan comunicarse entre sí. Permite que algunos hilos esperen (posiblemente con un tiempo máximo de espera) hasta que llegue la notificación de otro hilo para que ellos puedan continuar. Una variable de condición siempre está asociado a un mutex.

Defined in header <condition_variable>
provides a condition variable associated with a std::unique_lock
(clase)
provides a condition variable associated with any lock type
(clase)
schedules a call to notify_all to be invoked when this thread is completely finished
(función)
(C++11)
lists the possible results of timed waits on condition variables
(enum)

[editar] Futuros

La biblioteca estándar proporciona facilidades para la obtención de los valores que se devuelven y para atrapar las excepciones producidas por tareas asincrónas (es decir, las funciones puestas en marcha por hilos). Estos valores están en un "estado compartido", y de forma asincrona, se le puede poner un retorno o una excepción que será examinada por otros hilos.

Defined in header <future>
(C++11)
almacena un valor para la recuperación asincrónica
Original:
stores a value for asynchronous retrieval
The text has been machine-translated via Google Translate.
You can help to correct and verify the translation. Click here for instructions.

(clase de plantilla) [edit]
paquetes de una función para almacenar su valor de retorno para la recuperación asíncrona
Original:
packages a function to store its return value for asynchronous retrieval
The text has been machine-translated via Google Translate.
You can help to correct and verify the translation. Click here for instructions.

(clase de plantilla) [edit]
(C++11)
espera a un valor que se establece de forma asincrónica
Original:
waits for a value that is set asynchronously
The text has been machine-translated via Google Translate.
You can help to correct and verify the translation. Click here for instructions.

(clase de plantilla) [edit]
espera a un valor (posiblemente por referencia por otros futuros) que se establece de forma asincrónica
Original:
waits for a value (possibly referenced by other futures) that is set asynchronously
The text has been machine-translated via Google Translate.
You can help to correct and verify the translation. Click here for instructions.

(clase de plantilla) [edit]
(C++11)
ejecuta una función asíncrona (posiblemente en un nuevo hilo) y devuelve un std::future que contendrá el resultado
Original:
runs a function asynchronously (potentially in a new thread) and returns a std::future that will hold the result
The text has been machine-translated via Google Translate.
You can help to correct and verify the translation. Click here for instructions.

(función de plantilla) [edit]
(C++11)
especifica la política de lanzamiento de std::async
Original:
specifies the launch policy for std::async
The text has been machine-translated via Google Translate.
You can help to correct and verify the translation. Click here for instructions.

(enum) [edit]
especifica los resultados de temporizado esperas a cabo en std::future y std::shared_future
Original:
specifies the results of timed waits performed on std::future and std::shared_future
The text has been machine-translated via Google Translate.
You can help to correct and verify the translation. Click here for instructions.

(enum) [edit]
Future errors
informa de un error relacionado con futuros o promesas
Original:
reports an error related to futures or promises
The text has been machine-translated via Google Translate.
You can help to correct and verify the translation. Click here for instructions.

(clase) [edit]
identifica la categoría de error en el futuro
Original:
identifies the future error category
The text has been machine-translated via Google Translate.
You can help to correct and verify the translation. Click here for instructions.

(función) [edit]
identifica los códigos de error en el futuro
Original:
identifies the future error codes
The text has been machine-translated via Google Translate.
You can help to correct and verify the translation. Click here for instructions.

(enum) [edit]