Logger System 0.1.3
High-performance C++20 thread-safe logging system with asynchronous capabilities
Loading...
Searching...
No Matches
lockfree_queue.h File Reference

High-performance lock-free queue implementation. More...

#include <atomic>
#include <memory>
#include <array>
#include <type_traits>
Include dependency graph for lockfree_queue.h:
This graph shows which files directly or indirectly include this file:

Go to the source code of this file.

Classes

class  kcenon::logger::async::lockfree_spsc_queue< T, Size >
 Lock-free single-producer single-consumer queue. More...
 
struct  kcenon::logger::async::lockfree_spsc_queue< T, Size >::cell
 Cell structure with sequence number for ABA prevention. More...
 
class  kcenon::logger::async::lockfree_mpmc_queue< T, Size >
 Multi-producer multi-consumer lock-free queue (for future use) More...
 

Namespaces

namespace  kcenon
 
namespace  kcenon::logger
 
namespace  kcenon::logger::async
 

Functions

template<typename T , size_t Size = 1024>
std::unique_ptr< lockfree_spsc_queue< T, Size > > kcenon::logger::async::make_lockfree_queue ()
 Factory function to create a lock-free queue.
 

Detailed Description

High-performance lock-free queue implementation.

This file provides a lock-free queue optimized for single-producer, single-consumer scenarios commonly found in logging systems.

Features:

  • Lock-free implementation using atomic operations
  • Single-producer, single-consumer optimized
  • Memory ordering optimization
  • ABA problem prevention
  • Cache-friendly design with padding

Definition in file lockfree_queue.h.