SObjectizer 5.8
Loading...
Searching...
No Matches
so_5::details::no_lock_holder_t Class Reference

A class to be used as mixin without any real mutex instance inside. More...

#include <sync_helpers.hpp>

Inheritance diagram for so_5::details::no_lock_holder_t:
so_5::env_infrastructures::st_reusable_stuff::stats_controller_t< so_5::details::no_lock_holder_t >

Public Member Functions

template<typename Lambda >
auto lock_and_perform (Lambda &&l) const -> decltype(l())
 Perform necessary action.
 

Detailed Description

A class to be used as mixin without any real mutex instance inside.

Usage example:

template< typename Lock_Holder >
class coop_repo_t final : protected Lock_Holder
{
public :
bool has_live_coop()
{
this->lock_and_perform([&]{ return !m_coops.empty(); });
}
};
using non_mtsafe_coop_repo_t = coop_repo_t< so_5::details::no_lock_holder_t >;
Since
v.5.5.19

Definition at line 124 of file sync_helpers.hpp.

Member Function Documentation

◆ lock_and_perform()

template<typename Lambda >
auto so_5::details::no_lock_holder_t::lock_and_perform ( Lambda && l) const -> decltype(l())
inline

Perform necessary action.

Definition at line 130 of file sync_helpers.hpp.


The documentation for this class was generated from the following file: