|
Logger System 0.1.3
High-performance C++20 thread-safe logging system with asynchronous capabilities
|
Worker thread for reconnection attempts with jthread compatibility. More...

Public Types | |
| using | reconnect_callback = std::function<void()> |
Public Member Functions | |
| network_reconnect_jthread_worker (reconnect_callback callback, std::chrono::seconds interval) | |
| ~network_reconnect_jthread_worker () | |
| void | start () |
| void | stop () |
Private Attributes | |
| reconnect_callback | callback_ |
| std::chrono::seconds | reconnect_interval_ |
| compat_jthread | thread_ |
| std::atomic< bool > | running_ {false} |
Worker thread for reconnection attempts 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 122 of file network_writer.cpp.
| using kcenon::logger::network_reconnect_jthread_worker::reconnect_callback = std::function<void()> |
Definition at line 124 of file network_writer.cpp.
|
inlineexplicit |
Definition at line 126 of file network_writer.cpp.
|
inline |
Definition at line 132 of file network_writer.cpp.
References stop().

|
inline |
Definition at line 136 of file network_writer.cpp.
References callback_, reconnect_interval_, running_, stop(), and thread_.

|
inline |
Definition at line 181 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_reconnect_jthread_worker().


|
private |
Definition at line 192 of file network_writer.cpp.
Referenced by start().
|
private |
Definition at line 193 of file network_writer.cpp.
Referenced by start().
|
private |
|
private |
Definition at line 194 of file network_writer.cpp.