mutex Class (STL)

Represents a mutex type. Objects of this type can be used to enforce mutual exclusion within a program.

class mutex;

Name

Description

mutex::mutex Constructor (STL)

Constructs a mutex object.

mutex::~mutex Destructor (STL)

Releases any resources that were used by the mutex object.

Name

Description

mutex::lock Method (STL)

Blocks the calling thread until the thread obtains ownership of the mutex.

mutex::native_handle Method (STL)

Returns the implementation-specific type that represents the mutex handle.

mutex::try_lock Method (STL)

Attempts to obtain ownership of the mutex without blocking.

mutex::unlock Method (STL)

Releases ownership of the mutex.

Header: mutex

Namespace: std

Was this page helpful?
(1500 characters remaining)
Thank you for your feedback
Show:
© 2015 Microsoft