Creates a mutex with static storage duration.

Synopsis

Declared in <absl/synchronization/mutex.h>

constexpr
explicit
Mutex(absl::ConstInitType tag);

Description

A global variable constructed this way avoids the lifetime issues that can occur on program startup and shutdown. For Mutexes allocated on the heap and stack, instead use the default constructor.

Parameters

Name

Description

tag

A tag that selects this overload.

Created with MrDocs