std::once_flag
Материал из 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. |
| Заголовочный файл <mutex>
|
||
| class once_flag; |
(начиная с C++11) | |
Класс std::once_flag является вспомогательной структурой для std::call_once.
Объект с типом 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 является некопируемым.
Содержание |
[править] Функции-члены
std::once_flag::once_flag
| once_flag(); |
||
Конструктор объекта once_flag. Внутреннее состояние устанавливается в значение, указывающее что никакая функция не была вызвана.
Параметры
(нет)
Exceptions
[править] См. также
| (C++11) |
вызывает функцию только один раз, даже если вызывать из нескольких потоков 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. (шаблон функции) |