Container System 0.1.0
High-performance C++20 type-safe container framework with SIMD-accelerated serialization
Loading...
Searching...
No Matches
kcenon::container::epoch_guard Class Reference

RAII guard for epoch critical section. More...

#include <epoch_manager.h>

Collaboration diagram for kcenon::container::epoch_guard:
Collaboration graph

Public Member Functions

 epoch_guard () noexcept
 Enter critical section.
 
 ~epoch_guard () noexcept
 Exit critical section.
 
 epoch_guard (const epoch_guard &)=delete
 
epoch_guardoperator= (const epoch_guard &)=delete
 
 epoch_guard (epoch_guard &&)=delete
 
epoch_guardoperator= (epoch_guard &&)=delete
 

Detailed Description

RAII guard for epoch critical section.

Automatically enters critical section on construction and exits on destruction.

{
epoch_guard guard;
// ... access lock-free data structure ...
} // automatically exits critical section
RAII guard for epoch critical section.

Definition at line 298 of file epoch_manager.h.

Constructor & Destructor Documentation

◆ epoch_guard() [1/3]

kcenon::container::epoch_guard::epoch_guard ( )
inlinenoexcept

Enter critical section.

Definition at line 304 of file epoch_manager.h.

304 {
306 }
static epoch_manager & instance()
Get the singleton instance.
void enter_critical() noexcept
Enter critical section (pin to current epoch)

References kcenon::container::epoch_manager::enter_critical(), and kcenon::container::epoch_manager::instance().

Here is the call graph for this function:

◆ ~epoch_guard()

kcenon::container::epoch_guard::~epoch_guard ( )
inlinenoexcept

Exit critical section.

Definition at line 311 of file epoch_manager.h.

311 {
313 }
void exit_critical() noexcept
Exit critical section.

References kcenon::container::epoch_manager::exit_critical(), and kcenon::container::epoch_manager::instance().

Here is the call graph for this function:

◆ epoch_guard() [2/3]

kcenon::container::epoch_guard::epoch_guard ( const epoch_guard & )
delete

◆ epoch_guard() [3/3]

kcenon::container::epoch_guard::epoch_guard ( epoch_guard && )
delete

Member Function Documentation

◆ operator=() [1/2]

epoch_guard & kcenon::container::epoch_guard::operator= ( const epoch_guard & )
delete

◆ operator=() [2/2]

epoch_guard & kcenon::container::epoch_guard::operator= ( epoch_guard && )
delete

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