Helper class for automatic close of a mchain at the destruction of master handle instance.
More...
#include <mchain_helper_functions.hpp>
Helper class for automatic close of a mchain at the destruction of master handle instance.
This class is intended for cases like that:
The example shown above can be replaced by:
- Note
- This class is moveable but not copyable.
- Since
- v.5.5.17
◆ mchain_master_handle_t() [1/3]
◆ mchain_master_handle_t() [2/3]
Initializing constructor.
- Parameters
-
chain | A mchain itself. |
close_mode | Close mode for mchain. |
◆ mchain_master_handle_t() [3/3]
◆ ~mchain_master_handle_t()
so_5::mchain_master_handle_t::~mchain_master_handle_t |
( |
| ) |
|
|
inline |
Destructor closes the chain.
◆ get()
const mchain_t& so_5::mchain_master_handle_t::get |
( |
| ) |
const |
|
inlinenoexcept |
◆ make()
- Usage example:
{
std::thread worker;
detect_close_mode( config ) );
worker = std::thread( [ch = *chain]{ ... } );
...
}
◆ operator*()
const mchain_t& so_5::mchain_master_handle_t::operator* |
( |
| ) |
const |
|
inlinenoexcept |
◆ operator=() [1/2]
◆ operator=() [2/2]
◆ swap()
◆ with_drop_content()
- Usage example:
{
std::thread worker;
worker = std::thread( [ch = *chain]{ ... } );
...
}
◆ with_retain_content()
- Usage example:
{
std::thread worker;
worker = std::thread( [ch = *chain]{ ... } );
...
}
◆ m_chain
mchain_t so_5::mchain_master_handle_t::m_chain |
|
private |
◆ m_close_mode
The documentation for this class was generated from the following file: