std::once_flag
De cppreference.com
|
|
This page has been machine-translated from the English version of the wiki using Google Translate.
The translation may contain errors and awkward wording. Hover over text to see the original version. You can help to fix errors and improve the translation. For instructions click here. |
| Defined in header <mutex>
|
||
| class once_flag; |
(ya que 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.
Contenido |
[editar] Las funciones miembro
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
[editar] Ver también
| (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) |