|
Logger System 0.1.3
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 52 of file network_writer.cpp.
| using kcenon::logger::network_send_jthread_worker::send_callback = std::function<void()> |
Definition at line 54 of file network_writer.cpp.
|
inlineexplicit |
Definition at line 56 of file network_writer.cpp.
|
inline |
Definition at line 60 of file network_writer.cpp.
References stop().

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

|
inline |
Definition at line 95 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 110 of file network_writer.cpp.
Referenced by start().
|
private |
|
private |
|
private |
Definition at line 111 of file network_writer.cpp.