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

Batch processor implementation with jthread compatibility. More...

#include "batch_processor.h"
#include "../memory/object_pool.h"
#include "jthread_compat.h"
#include <algorithm>
#include <chrono>
#include <condition_variable>
#include <thread>
Include dependency graph for batch_processor.cpp:

Go to the source code of this file.

Classes

class  kcenon::logger::async::batch_processing_jthread_worker
 Worker thread for batch processing with jthread compatibility. More...
 

Namespaces

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

Functions

std::unique_ptr< batch_processorkcenon::logger::async::make_batch_processor (log_writer_ptr writer, const batch_processor::config &cfg=batch_processor::config{})
 Factory function to create a batch processor.
 

Detailed Description

Batch processor implementation with jthread compatibility.

Since
1.3.0 - Refactored to use jthread compatibility layer

This implementation uses C++20 std::jthread with std::stop_token for cooperative cancellation where available, with fallback to std::thread for environments without jthread support (e.g., libc++).

Definition in file batch_processor.cpp.