|
Logger System 1.0.0
High-performance C++20 thread-safe logging system with asynchronous capabilities
|
Worker thread for sending buffered logs with jthread compatibility. More...

Public Types | |
| using | send_callback = std::function<void()> |
Public Member Functions | |
| network_send_jthread_worker (send_callback callback) | |
| ~network_send_jthread_worker () | |
| void | start () |
| void | stop () |
| void | notify_work () |
Private Attributes | |
| send_callback | callback_ |
| compat_jthread | thread_ |
| std::atomic< bool > | running_ {false} |
| std::atomic< bool > | has_work_ {false} |
Worker thread for sending buffered logs with jthread compatibility.
Uses std::jthread with std::stop_token for cooperative cancellation where available, falls back to std::thread with manual stop mechanism.
Definition at line 53 of file network_writer.cpp.
| using kcenon::logger::network_send_jthread_worker::send_callback = std::function<void()> |
Definition at line 55 of file network_writer.cpp.
|
inlineexplicit |
Definition at line 57 of file network_writer.cpp.
|
inline |
Definition at line 61 of file network_writer.cpp.
References stop().

|
inline |
Definition at line 106 of file network_writer.cpp.
References has_work_.
|
inline |
Definition at line 65 of file network_writer.cpp.
References callback_, running_, stop(), and thread_.

|
inline |
Definition at line 96 of file network_writer.cpp.
References kcenon::logger::async::compat_jthread::join(), kcenon::logger::async::compat_jthread::request_stop(), running_, and thread_.
Referenced by start(), and ~network_send_jthread_worker().


|
private |
Definition at line 111 of file network_writer.cpp.
Referenced by start().
|
private |
|
private |
|
private |
Definition at line 112 of file network_writer.cpp.