36#if LOGGER_HAS_IEXECUTOR
38#if __has_include(<kcenon/common/interfaces/executor_interface.h>)
39#include <kcenon/common/interfaces/executor_interface.h>
40#elif __has_include(<common/interfaces/executor_interface.h>)
41#include <common/interfaces/executor_interface.h>
57enum class executor_type {
135 static void enable(std::shared_ptr<common::interfaces::IExecutor> executor =
nullptr);
146 static void disable();
154 [[nodiscard]]
static bool is_enabled() noexcept;
162 [[nodiscard]] static executor_type get_executor_type() noexcept;
176 static
void set_executor(std::shared_ptr<
common::interfaces::IExecutor> executor);
184 [[nodiscard]] static std::shared_ptr<
common::interfaces::IExecutor> get_executor() noexcept;
207 [[nodiscard]] static
bool submit_task(std::function<
void()> task);
215 [[nodiscard]] static
bool submit_task_delayed(
216 std::function<
void()> task,
217 std::chrono::milliseconds delay_ms);
223 [[nodiscard]] static std::
string get_executor_name() noexcept;
229 [[nodiscard]] static
size_t pending_tasks() noexcept;
235 [[nodiscard]] static
size_t worker_count() noexcept;
239 executor_integration() = delete;
240 ~executor_integration() = delete;
241 executor_integration(const executor_integration&) = delete;
242 executor_integration& operator=(const executor_integration&) = delete;
245 static std::atomic<executor_type> current_type_;
246 static std::shared_ptr<
common::interfaces::IExecutor> executor_;
247 static std::mutex executor_mutex_;
253 static std::shared_ptr<
common::interfaces::IExecutor> create_default_executor();
271[[nodiscard]] constexpr
bool has_executor_support() noexcept {
290 [[nodiscard]]
static constexpr bool is_enabled() noexcept {
return false; }
291 [[nodiscard]]
static bool submit_task(std::function<
void()>) noexcept {
return false; }
Stub implementation when IExecutor is not available.
static std::string get_executor_name() noexcept
executor_integration()=delete
static void enable() noexcept
static void disable() noexcept
static bool submit_task(std::function< void()>) noexcept
static constexpr bool is_enabled() noexcept
DLL export/import macros for logger_system shared library support.
#define LOGGER_SYSTEM_API
@ standalone
Standalone backend using std::jthread.
constexpr bool has_executor_support() noexcept
Standalone IExecutor implementation using std::jthread.
Conditionally enables thread_system integration when available.