SObjectizer-5 Extra
|
Namespaces | |
namespace | details |
namespace | errors |
Classes | |
struct | msg_first_subscriber |
Signal to be sent when the first subscriber arrives. More... | |
struct | msg_last_subscriber |
Signal to be sent when the last subscriber gone. More... | |
Functions | |
template<typename Msg_Type , typename Lock_Type = std::mutex> | |
mbox_t | make_mbox (environment_t &env, mbox_t notification_mbox, mbox_type_t mbox_type) |
Create an instance of first_last_subscriber_notification mbox. | |
template<typename Msg_Type , typename Lock_Type = std::mutex> | |
mbox_t | make_multi_consumer_mbox (environment_t &env, mbox_t notification_mbox) |
Create an instance of first_last_subscriber_notification MPMC mbox. | |
template<typename Msg_Type , typename Lock_Type = std::mutex> | |
mbox_t | make_single_consumer_mbox (environment_t &env, mbox_t notification_mbox) |
Create an instance of first_last_subscriber_notification MPSC mbox. | |
|
nodiscard |
Create an instance of first_last_subscriber_notification mbox.
Usage examples:
Create a MPMC mbox with std::mutex as Lock_Type (this mbox can safely be used in multi-threaded environments):
Create a MPSC mbox with std::mutex as Lock_Type (this mbox can safely be used in multi-threaded environments):
Create a MPMC mbox with so_5::null_mutex_t as Lock_Type (this mbox can only be used in single-threaded environments):
Msg_Type | type of message to be used with a new mbox. |
Lock_Type | type 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). |
env | SObjectizer Environment to work in. |
notification_mbox | Mbox for notifications about the first/last subscriber. |
mbox_type | Type of this mbox (MPSC or MPMC). |
Definition at line 704 of file first_last_subscriber_notification.hpp.
|
nodiscard |
Create an instance of first_last_subscriber_notification MPMC mbox.
Usage examples:
Create a MPMC mbox with std::mutex as Lock_Type (this mbox can safely be used in multi-threaded environments):
env | SObjectizer Environment to work in. |
notification_mbox | Mbox for notifications about the first/last subscriber. |
Definition at line 781 of file first_last_subscriber_notification.hpp.
|
nodiscard |
Create an instance of first_last_subscriber_notification MPSC mbox.
Usage examples:
Create a MPSC mbox with std::mutex as Lock_Type (this mbox can safely be used in multi-threaded environments):
env | SObjectizer Environment to work in. |
notification_mbox | Mbox for notifications about the first/last subscriber. |
Definition at line 824 of file first_last_subscriber_notification.hpp.