std::timed_mutex::try_lock_for
De cppreference.com
< cpp | thread | timed mutex
![]() |
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. |
template< class Rep, class Period > bool try_lock_for( const std::chrono::duration<Rep,Period>& timeout_duration ); |
(depuis C++11) | |
Essaie de verrouiller le mutex. Bloque jusqu'à
timeout_duration
spécifié s'est écoulé ou le verrou est acquis, selon la première éventualité. Lors de l'acquisition true succès revient serrure, sinon retourne false. Peut bloquer pendant plus de timeout_duration
.Original:
Tries to lock the mutex. Blocks until specified
timeout_duration
has elapsed or the lock is acquired, whichever comes first. On successful lock acquisition returns true, otherwise returns false. May block for longer than timeout_duration
.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.
Sommaire |
[modifier] Paramètres
timeout_duration | - | durée maximale de bloquer pour
Original: maximum duration to block for The text has been machine-translated via Google Translate. You can help to correct and verify the translation. Click here for instructions. |
[modifier] Retourne la valeur
true si le verrou a été acquis avec succès, sinon false .
Original:
true if the lock was acquired successfully, otherwise false.
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.
[modifier] Exceptions
This section is incomplete |
[modifier] Exemple
This section is incomplete Reason: no example |
[modifier] Voir aussi
verrouille le mutex, bloque si le mutex n'est pas disponible (fonction membre publique) | |
essaie de verrouiller le mutex, retourne si le mutex n'est pas disponible Original: tries to lock the mutex, returns if the mutex is not available The text has been machine-translated via Google Translate. You can help to correct and verify the translation. Click here for instructions. (fonction membre publique) | |
essaie de verrouiller le mutex, si le mutex retourne a been unavailable jusqu'à ce point dans le temps spécifié a été atteint 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. (fonction membre publique) | |
déverrouille le mutex Original: unlocks the mutex The text has been machine-translated via Google Translate. You can help to correct and verify the translation. Click here for instructions. (fonction membre publique) |