There is so_5::null_mutex_t thas has empty (no-op) methods lock and unlock. It can be used for a case when actual locking is not needed (for example, in single threaded environments).
It may be useful to have also empty (no-op) methods lock_shared and unlock_shared. It that case so_5::null_mutex_t can be used instead of std::shared_mutex when actual locking is not needed.
There is
so_5::null_mutex_tthas has empty (no-op) methodslockandunlock. It can be used for a case when actual locking is not needed (for example, in single threaded environments).It may be useful to have also empty (no-op) methods
lock_sharedandunlock_shared. It that caseso_5::null_mutex_tcan be used instead ofstd::shared_mutexwhen actual locking is not needed.