std::lock_guard::lock_guard
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> explicit lock_guard( mutex_type& m ); |
(1) | (seit C++11) |
lock_guard( mutex_type& m, std::adopt_lock_t t ); |
(2) | (seit C++11) |
Erwirbt Eigentum des jeweiligen Mutex
m .Original:
Acquires ownership of the given mutex
m.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)
Wenn
m nicht eine rekursive Mutex, setzt voraus, dass der aktuelle Thread nicht besitzt m. Effektiv nennt m.lock() .Original:
If
m is not a recursive mutex, requires that the current thread does not own m. Effectively calls m.lock().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)
Erfordert, dass der aktuelle Thread
m besitzt .Original:
Requires that the current thread owns
m.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.
Das Verhalten ist undefiniert, wenn
m zerstört wird, bevor die lock_guard Objekt ist .Original:
The behavior is undefined if
m is destroyed before the lock_guard object is.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.
Parameter
| m | - | Mutex zu erwerben Eigentum an
Original: mutex to 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, um Non-Locking Version des Konstruktors zu wählen
Original: tag parameter used to select non-locking version of the constructor The text has been machine-translated via Google Translate. You can help to correct and verify the translation. Click here for instructions. |