Namensräume
Varianten
Aktionen

std::unique_lock::unique_lock

Aus cppreference.com
< cpp‎ | thread‎ | unique lock

 
 
Thema Support-Bibliothek
Threads
Original:
Threads
The text has been machine-translated via Google Translate.
You can help to correct and verify the translation. Click here for instructions.
thread(C++11)
this_thread Namespace
Original:
this_thread namespace
The text has been machine-translated via Google Translate.
You can help to correct and verify the translation. Click here for instructions.
get_id(C++11)
yield(C++11)
sleep_for(C++11)
sleep_until(C++11)
Gegenseitigen Ausschluss
Original:
Mutual exclusion
The text has been machine-translated via Google Translate.
You can help to correct and verify the translation. Click here for instructions.
mutex(C++11)
timed_mutex(C++11)
Generische Sperrverwaltung
Original:
Generic lock management
The text has been machine-translated via Google Translate.
You can help to correct and verify the translation. Click here for instructions.
lock_guard(C++11)
unique_lock(C++11)
defer_lock_t
try_to_lock_t
adopt_lock_t
(C++11)
(C++11)
(C++11)
lock(C++11)
try_lock(C++11)
defer_lock
try_to_lock
adopt_lock
(C++11)
(C++11)
(C++11)
Zustand Variablen
Original:
Condition variables
The text has been machine-translated via Google Translate.
You can help to correct and verify the translation. Click here for instructions.
condition_variable(C++11)
condition_variable_any(C++11)
notify_all_at_thread_exit(C++11)
cv_status(C++11)
Futures
Original:
Futures
The text has been machine-translated via Google Translate.
You can help to correct and verify the translation. Click here for instructions.
promise(C++11)
future(C++11)
shared_future(C++11)
packaged_task(C++11)
async(C++11)
launch(C++11)
future_status(C++11)
future_error(C++11)
future_category(C++11)
future_errc(C++11)
 
std::unique_lock
Member-Funktionen
Original:
Member functions
The text has been machine-translated via Google Translate.
You can help to correct and verify the translation. Click here for instructions.
unique_lock::unique_lock
unique_lock::~unique_lock
unique_lock::operator=
Sperren
Original:
Locking
The text has been machine-translated via Google Translate.
You can help to correct and verify the translation. Click here for instructions.
unique_lock::lock
unique_lock::try_lock
unique_lock::try_lock_for
unique_lock::try_lock_until
unique_lock::unlock
Modifiers
Original:
Modifiers
The text has been machine-translated via Google Translate.
You can help to correct and verify the translation. Click here for instructions.
unique_lock::swap
unique_lock::release
Beobachter
Original:
Observers
The text has been machine-translated via Google Translate.
You can help to correct and verify the translation. Click here for instructions.
unique_lock::mutex
unique_lock::owns_lock
unique_lock::operator bool
Non-Member-Funktionen
Original:
Non-member functions
The text has been machine-translated via Google Translate.
You can help to correct and verify the translation. Click here for instructions.
std::swap
 
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.
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.
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.
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.
3)
Sperrt die zugehörige Mutex durch den Aufruf m.lock() .
Original:
Locks the associated mutex by calling m.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 calling m.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 owns m.
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_duration abgelaufen ist oder die Sperre erworben, was zuerst eintritt. Kann länger als timeout_duration blockieren .
Original:
Tries to lock the associated mutex. Blocks until specified timeout_duration has elapsed or the lock is acquired, whichever comes first. 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.
8)
Versucht, die zugehörige Mutex zu sperren. Blöcke bis angegebenen timeout_time erreicht wurde oder das Schloss erworben, was zuerst eintritt. Darf nicht länger als bis zum timeout_time erreicht worden blockieren .
Original:
Tries to lock the associated mutex. Blocks until specified timeout_time has been reached or the lock is acquired, whichever comes first. May block for longer than until timeout_time 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.

[Bearbeiten] Parameter

other -
anderen unique_lock den Staat mit zu initialisieren
Original:
another unique_lock to initialize the state with
The 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.

[Bearbeiten] Ausnahmen

1, 2, 4)
noexcept specification:  
noexcept
  (seit C++11)

[Bearbeiten] Beispiel