GSP
Quick Navigator

Search Site

Unix VPS
A - Starter
B - Basic
C - Preferred
D - Commercial
MPS - Dedicated
Previous VPSs
* Sign Up! *

Support
Contact Us
Online Help
Handbooks
Domain Status
Man Pages

FAQ
Virtual Servers
Pricing
Billing
Technical

Network
Facilities
Connectivity
Topology Map

Miscellaneous
Server Agreement
Year 2038
Credits
 

USA Flag

 

 

Man Pages
std::lock_guard::lock_guard(3) C++ Standard Libary std::lock_guard::lock_guard(3)

std::lock_guard::lock_guard - std::lock_guard::lock_guard


explicit lock_guard( mutex_type& m ); (1) (since C++11)
lock_guard( mutex_type& m, std::adopt_lock_t t ); (2) (since C++11)
lock_guard( const lock_guard& ) = delete; (3) (since C++11)


Acquires ownership of the given mutex m.


1) Effectively calls m.lock().
2) Acquires ownership of the mutex m without attempting to lock it. The behavior is
undefined if the current thread does not hold a non-shared lock (i.e., a lock
acquired by lock, try_lock, try_lock_for, or try_lock_until) on m.
3) Copy constructor is deleted.


The behavior is undefined if m is destroyed before the lock_guard object is.


m - mutex to acquire ownership of.
t - tag parameter used to select non-locking version of the constructor.


1) Throws any exceptions thrown by m.lock().
2) Throws nothing.

2022.07.31 http://cppreference.com

Search for    or go to Top of page |  Section 3 |  Main Index

Powered by GSP Visit the GSP FreeBSD Man Page Interface.
Output converted with ManDoc.