SObjectizer-5 Extra
Loading...
Searching...
No Matches
so_5::extra::mboxes::unique_subscribers Namespace Reference

Namespaces

namespace  errors
 

Functions

template<typename Lock_Type = std::mutex>
mbox_t make_mbox (so_5::environment_t &env)
 Factory function for creation of a new instance of unique_subscribers mbox.
 

Function Documentation

◆ make_mbox()

template<typename Lock_Type = std::mutex>
mbox_t so_5::extra::mboxes::unique_subscribers::make_mbox ( so_5::environment_t & env)
nodiscard

Factory function for creation of a new instance of unique_subscribers mbox.

Usage examples:

Create a mbox with std::mutex as Lock_Type (this mbox can safely be used in multi-threaded environments):

so_5::environment_t & env = ...;
mbox_t make_mbox(so_5::environment_t &env)
Factory function for creation of a new instance of unique_subscribers mbox.

Create a mbox with so_5::null_mutex_t as Lock_Type (this mbox can only be used in single-threaded environments):

so_5::environment_t & env = ...;
Template Parameters
Lock_Typetype of lock to be used for thread safety. It can be std::mutex or so_5::null_mutex_t (or any other type which can be used with std::lock_quard).
Deprecated
Since v.1.6.0 it's just a synonum for so_5::make_unique_subscribers_mbox(). This function is kept here for compatibility reasons. It will be removed in some future release of so5extra.
Since
v.1.5.0
Examples
mboxes/unique_subscribers/simple/main.cpp.

Definition at line 100 of file unique_subscribers.hpp.