std::unique_lock::unique_lock
Aus 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. |
<metanoindex/>
<tbody> </tbody> unique_lock(); |
(1) | (seit C++11) |
unique_lock( unique_lock&& other ); |
(2) | (seit C++11) |
explicit unique_lock( mutex_type& m ); |
(3) | (seit C++11) |
unique_lock( mutex_type& m, std::defer_lock_t t ); |
(4) | (seit C++11) |
unique_lock( mutex_type& m, std::try_to_lock_t t ); |
(5) | (seit C++11) |
unique_lock( mutex_type& m, std::adopt_lock_t t ); |
(6) | (seit C++11) |
template< class Rep, class Period > unique_lock( mutex_type& m, const std::chrono::duration<Rep,Period>& timeout_duration ); |
(7) | (seit C++11) |
template< class Clock, class Period > unique_lock( mutex_type& m, const std::chrono::time_point<Clock,Duration>& timeout_time ); |
(8) | (seit C++11) |
Erzeugt ein
unique_lock, wahlweise Verriegelung der mitgelieferten Mutex .Original:
Constructs a
unique_lock, optionally locking the supplied mutex.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.
1)
Erzeugt ein
unique_lock ohne zugehörige Mutex .Original:
Constructs a
unique_lock with no associated mutex.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.
2)
Bewegen Konstruktor. Initialisiert die
unique_lock mit dem Inhalt other .Original:
Move constructor. Initializes the
unique_lock with the contents of other.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.
3-8)
Erzeugt ein
unique_lock mit m wie die zugehörige Mutex. Zusätzlich:Original:
Constructs a
unique_lock with m as the associated mutex. Additionally: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.
- 3) Sperrt die zugehörige Mutex durch den Aufruf
m.lock().Original:Locks the associated mutex by callingm.lock().The text has been machine-translated via Google Translate.
You can help to correct and verify the translation. Click here for instructions.
- 4) Nicht sperren die zugehörige Mutex .Original:Does not lock the associated mutex.The text has been machine-translated via Google Translate.
You can help to correct and verify the translation. Click here for instructions.
- 5) Versucht, die zugehörige Mutex ohne Blockierung durch den Aufruf
m.try_lock()sperren .Original:Tries to lock the associated mutex without blocking by callingm.try_lock().The text has been machine-translated via Google Translate.
You can help to correct and verify the translation. Click here for instructions.
- 6) Übernimmt der aufrufende Thread besitzt bereits
m.Original:Assumes the calling thread already ownsm.The text has been machine-translated via Google Translate.
You can help to correct and verify the translation. Click here for instructions.
- 7) Versucht, die zugehörige Mutex zu sperren. Blöcke bis angegebenen
timeout_durationabgelaufen ist oder die Sperre erworben, was zuerst eintritt. Kann länger alstimeout_durationblockieren .Original:Tries to lock the associated mutex. Blocks until specifiedtimeout_durationhas elapsed or the lock is acquired, whichever comes first. May block for longer thantimeout_duration.The text has been machine-translated via Google Translate.
You can help to correct and verify the translation. Click here for instructions.
- 8) Versucht, die zugehörige Mutex zu sperren. Blöcke bis angegebenen
timeout_timeerreicht wurde oder das Schloss erworben, was zuerst eintritt. Darf nicht länger als bis zumtimeout_timeerreicht worden blockieren .Original:Tries to lock the associated mutex. Blocks until specifiedtimeout_timehas been reached or the lock is acquired, whichever comes first. May block for longer than untiltimeout_timehas been reached.The text has been machine-translated via Google Translate.
You can help to correct and verify the translation. Click here for instructions.
Parameter
| other | - | anderen
unique_lock den Staat mit zu initialisierenOriginal: another unique_lock to initialize the state withThe text has been machine-translated via Google Translate. You can help to correct and verify the translation. Click here for instructions. |
| m | - | Mutex mit dem Schloss zu verknüpfen und gegebenenfalls zu eigen
Original: mutex to associate with the lock and optionally acquire ownership of The text has been machine-translated via Google Translate. You can help to correct and verify the translation. Click here for instructions. |
| t | - | Tag-Parameter verwendet werden, um Konstruktoren mit unterschiedlichen Sperrstrategien wählen
Original: tag parameter used to select constructors with different locking strategies The text has been machine-translated via Google Translate. You can help to correct and verify the translation. Click here for instructions. |
| timeout_duration | - | maximale Dauer für zu blockieren
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. |
| timeout_time | - | maximale Zeitpunkt, bis zu blockieren
Original: maximum time point to block until The text has been machine-translated via Google Translate. You can help to correct and verify the translation. Click here for instructions. |
Ausnahmen
1, 2, 4)
Beispiel
| This section is incomplete Reason: no example |