47#ifdef LOGGER_HAS_THREAD_SYSTEM
48#include <kcenon/thread/core/thread_pool.h>
86#ifdef LOGGER_HAS_THREAD_SYSTEM
146 static void enable(std::shared_ptr<kcenon::thread::thread_pool> pool =
nullptr);
157 static void disable();
165 [[nodiscard]]
static bool is_enabled() noexcept;
173 [[nodiscard]] static async_backend_type get_backend() noexcept;
187 static
void set_thread_pool(std::shared_ptr<
kcenon::thread::thread_pool> pool);
195 [[nodiscard]] static std::shared_ptr<
kcenon::thread::thread_pool> get_thread_pool() noexcept;
217 [[nodiscard]] static
bool submit_task(std::function<
void()> task);
226 [[nodiscard]] static std::
string get_backend_name() noexcept;
230 thread_system_integration() = delete;
231 ~thread_system_integration() = delete;
232 thread_system_integration(const thread_system_integration&) = delete;
233 thread_system_integration& operator=(const thread_system_integration&) = delete;
236 static std::atomic<async_backend_type> current_backend_;
237 static std::shared_ptr<
kcenon::thread::thread_pool> thread_pool_;
238 static std::mutex pool_mutex_;
244 static std::shared_ptr<
kcenon::thread::thread_pool> create_default_pool();
289 return async_backend_type::standalone;
297 [[nodiscard]]
static bool submit_task(std::function<
void()> ) noexcept {
334#ifdef LOGGER_HAS_THREAD_SYSTEM
Stub implementation when thread_system is not available.
static std::string get_backend_name() noexcept
Always returns "standalone" when thread_system is not available.
~thread_system_integration()=delete
static void disable() noexcept
No-op when thread_system is not available.
static void enable() noexcept
No-op when thread_system is not available.
thread_system_integration()=delete
thread_system_integration & operator=(const thread_system_integration &)=delete
static constexpr async_backend_type get_backend() noexcept
Always returns standalone when thread_system is not available.
static constexpr bool is_enabled() noexcept
Always returns false when thread_system is not available.
static bool submit_task(std::function< void()>) noexcept
Always returns false when thread_system is not available.
thread_system_integration(const thread_system_integration &)=delete
DLL export/import macros for logger_system shared library support.
#define LOGGER_SYSTEM_API
constexpr bool has_thread_system_support() noexcept
Helper function to check if thread_system integration is available.
async_backend_type
Backend type enumeration for async processing.
@ standalone
Standalone backend using std::jthread.
@ thread_pool
Thread pool backend using thread_system.