std::once_flag
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. |
<metanoindex/>
<tbody> </tbody>| Elemento definito nell'header <mutex>
|
||
class once_flag; |
(dal 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.
Membri funzioni
std::once_flag::once_flag
<tbody> </tbody> once_flag(); |
||
Constructs an once_flag object. The internal state is set to indicate that no function has been called yet.
Parameters
(none)
Exceptions
Vedi anche
(C++11) |
richiama una funzione solo una volta, anche se chiamato da più thread 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. (funzione di modello) |