|
Thread System 0.3.1
High-performance C++20 thread pool with work stealing and DAG scheduling
|
Hazard pointer usage for safe lock-free memory reclamation. More...
#include "thread_base/lockfree/memory/hazard_pointer.h"#include "logger/core/logger.h"#include <thread>#include <vector>#include <random>#include <chrono>#include <atomic>
Go to the source code of this file.
Classes | |
| struct | TestNode |
| class | LockFreeStack |
Functions | |
| void | demonstrate_basic_usage () |
| void | demonstrate_concurrent_access () |
| void | demonstrate_memory_safety () |
| int | main () |
Hazard pointer usage for safe lock-free memory reclamation.
Definition in file hazard_pointer_sample.cpp.
| void demonstrate_basic_usage | ( | ) |
Definition at line 79 of file hazard_pointer_sample.cpp.
Referenced by main().

| void demonstrate_concurrent_access | ( | ) |
Definition at line 121 of file hazard_pointer_sample.cpp.
References LockFreeStack::pop(), and LockFreeStack::push().
Referenced by main().


| void demonstrate_memory_safety | ( | ) |
Definition at line 192 of file hazard_pointer_sample.cpp.
Referenced by main().

| int main | ( | ) |
Definition at line 254 of file hazard_pointer_sample.cpp.
References demonstrate_basic_usage(), demonstrate_concurrent_access(), and demonstrate_memory_safety().
