std::unique_lock::unique_lock
cppreference.com
[] |
Google. . , . , . |
<metanoindex/>
<tbody> </tbody> unique_lock(); |
(1) | ( C++11) |
unique_lock( unique_lock&& other ); |
(2) | ( C++11) |
explicit unique_lock( mutex_type& m ); |
(3) | ( C++11) |
unique_lock( mutex_type& m, std::defer_lock_t t ); |
(4) | ( C++11) |
unique_lock( mutex_type& m, std::try_to_lock_t t ); |
(5) | ( C++11) |
unique_lock( mutex_type& m, std::adopt_lock_t t ); |
(6) | ( C++11) |
template< class Rep, class Period > unique_lock( mutex_type& m, const std::chrono::duration<Rep,Period>& timeout_duration ); |
(7) | ( C++11) |
template< class Clock, class Period > unique_lock( mutex_type& m, const std::chrono::time_point<Clock,Duration>& timeout_time ); |
(8) | ( C++11) |
unique_lock, .1)
unique_lock, .2)
.
unique_lock other.3-8)
unique_lock m . :- 3)
m.lock().
- 4) .
- 5)
m.try_lock().
- 6) ,
m.
- 7) .
timeout_duration, . ,timeout_duration.: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.
- 8) .
timeout_time, . ,timeout_time.: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.
| other | unique_lock | |
| m | , , ,
| |
| t | ||
| timeout_duration | ||
| timeout_time | ,
|
1, 2, 4)
noexcept:
noexcept| : |