A header-only mutex which implements the Lockable concept of Boost.Thread.

The `mutex` class implements the `Lockable` concept of Boost.Thread, and is the default `Mutex` template parameter type for signals. If boost has detected thread support in your compiler, the `mutex` class will map to a CRITICAL_SECTION on Windows or a pthread_mutex on POSIX. If thread support is not detected, `mutex` will behave similarly to a `dummy_mutex`. The header file `boost/config.hpp` defines the macro `BOOST_HAS_THREADS` when boost detects threading support. The user may globally disable thread support in boost by defining BOOST_DISABLE_THREADS before any boost header files are included.

If you are already using the Boost.Thread library, you may prefer to use its `boost::mutex` class instead as the mutex type for your signals.

You may wish to use a thread-unsafe signal, if the signal is only used by a single thread. In that case, you may prefer to use the `signals2::dummy_mutex` class as the `Mutex` template type for your signal.

void

Locks the mutex.

bool

Makes a non-blocking attempt to lock the mutex.

`true` on success.

void

Unlocks the mutex.