std::timed_mutex
Материал из 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 timed_mutex; |
(начиная с C++11) | |
timed_mutex класс примитив синхронизации, которые могут быть использованы для защиты общих данных от одновременного доступа нескольких потоков. Original:
The
timed_mutex class is a synchronization primitive that can be used to protect shared data from being simultaneously accessed by multiple threads. The text has been machine-translated via Google Translate.
You can help to correct and verify the translation. Click here for instructions.
You can help to correct and verify the translation. Click here for instructions.
In a manner similar to mutex, timed_mutex offers exclusive, non-recursive ownership semantics. In addition, timed_mutex provides the ability to attempt to claim ownership of a timed_mutex with a timeout via the try_lock_for and try_lock_until methods.
timed_mutex класс не является копируемой.Original:
The
timed_mutex class is non-copyable.The text has been machine-translated via Google Translate.
You can help to correct and verify the translation. Click here for instructions.
You can help to correct and verify the translation. Click here for instructions.
[править] Член типов
| Член типа
Original: Member type The text has been machine-translated via Google Translate. You can help to correct and verify the translation. Click here for instructions. |
Definition |
native_handle_type
|
Определяется реализацией
Original: implementation-defined The text has been machine-translated via Google Translate. You can help to correct and verify the translation. Click here for instructions. |
[править] Член функций
| создаёт мьютекс Original: constructs the mutex The text has been machine-translated via Google Translate. You can help to correct and verify the translation. Click here for instructions. (public функция-член) | |
Original: Locking The text has been machine-translated via Google Translate. You can help to correct and verify the translation. Click here for instructions. | |
| блокирует мьютекс, выполнение останавливается если мьютекс не доступен (public функция-член) | |
| пытается заблокировать мьютекс, возвращается, если мьютекс не доступен (public функция-член) | |
| пытается заблокировать мьютекс, возвращается, если мьютекс имеет been unavailable за указанный период тайм-аута Original: tries to lock the mutex, returns if the mutex has been unavailable for the specified timeout duration The text has been machine-translated via Google Translate. You can help to correct and verify the translation. Click here for instructions. (public функция-член) | |
| пытается заблокировать мьютекс, возвращается, если мьютекс имеет been unavailable до указанного момента времени была достигнута Original: tries to lock the mutex, returns if the mutex has been unavailable until specified time point has been reached The text has been machine-translated via Google Translate. You can help to correct and verify the translation. Click here for instructions. (public функция-член) | |
| разблокирует мьютекс (public функция-член) | |
Original: Native handle The text has been machine-translated via Google Translate. You can help to correct and verify the translation. Click here for instructions. | |
| возвращает определяемый реализацией дескриптор потока (public функция-член) | |