Espaços nominais
Variantes
Acções

std::once_flag

Da cppreference.com
< cpp‎ | thread

 
 
Biblioteca de suporte a discussão
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 namespace
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)
Exclusão mútua
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)
Gestão de bloqueio 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)
Variáveis ​​de condição
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.
(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)
 
Definido no cabeçalho <mutex>
class once_flag;
(desde C++11)

The class std::once_flag is a helper structure for std::call_once.

An object of type std::once_flag that is passed to multiple calls to std::call_once allows those calls to coordinate with eachother such that only one of the calls will actually run to completion.

std::once_flag is noncopyable.

Índice

[editar]Funções de membro

std::once_flag::once_flag

once_flag();

Constructs an once_flag object. The internal state is set to indicate that no function has been called yet.

Parameters

(none)

Exceptions

noexcept specification:  
noexcept
  (desde C++11)

[editar]Veja também

(C++11)
chama uma função apenas uma vez, mesmo se chamado de vários segmentos
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.

(modelo de função)[edit]
close