Skip to content

refactor(integration): migrate to IExecutor interface#255

Merged
kcenon merged 3 commits into
mainfrom
feature/migrate-to-iexecutor-interface-253
Dec 26, 2025
Merged

refactor(integration): migrate to IExecutor interface#255
kcenon merged 3 commits into
mainfrom
feature/migrate-to-iexecutor-interface-253

Conversation

@kcenon

@kcenon kcenon commented Dec 26, 2025

Copy link
Copy Markdown
Owner

Summary

  • Add IExecutor-based async integration layer for logger_system
  • Implement standalone_executor as default IExecutor implementation
  • Update thread_integration_detector.h to support IExecutor detection
  • Add comprehensive unit tests for executor_integration

Changes

New Files

  • include/kcenon/logger/integration/executor_integration.h - IExecutor-based integration manager
  • include/kcenon/logger/integration/standalone_executor.h - Standalone IExecutor implementation
  • src/integration/executor_integration.cpp - executor_integration implementation
  • src/integration/standalone_executor.cpp - standalone_executor implementation
  • tests/unit/executor_integration_test.cpp - Unit tests for executor_integration

Modified Files

  • include/kcenon/logger/core/thread_integration_detector.h - Added IExecutor detection
  • docs/integration/THREAD_SYSTEM.md - Updated with IExecutor documentation
  • tests/CMakeLists.txt - Added executor_integration_test

Test plan

  • All 16 executor_integration unit tests pass
  • Build succeeds without thread_system dependency
  • IExecutor interface detection works correctly
  • standalone_executor works as expected

Benefits

  1. No compile-time dependency on thread_system
  2. Runtime executor injection for flexibility
  3. Better testability with mock executors
  4. Future-proof architecture

Closes #253

Add new executor integration infrastructure using common_system's IExecutor
interface instead of direct thread_system dependency. This provides:

- standalone_executor: IExecutor implementation using std::jthread
- executor_integration: Manager class for runtime executor injection
- Updated thread_integration_detector.h with IExecutor detection

Benefits:
- No compile-time dependency on thread_system
- Runtime executor injection for flexibility
- Better testability with mock executors

Implements part of #253
Add comprehensive unit tests for the new IExecutor-based integration:

- Basic state tests (enable, disable, executor type)
- Task submission tests (sync, async, delayed)
- standalone_executor tests (basic, job execution, factory)
- Thread safety tests (concurrent state checks, task submission)
- Metrics tests (pending_tasks, worker_count)

All 16 tests pass successfully.

Part of #253
Update THREAD_SYSTEM.md to include:

- IExecutor interface integration overview
- executor_integration API reference
- standalone_executor documentation
- Migration guide from thread_system_integration
- Updated related documentation links

Part of #253
@kcenon kcenon merged commit 67847bc into main Dec 26, 2025
29 checks passed
@kcenon kcenon deleted the feature/migrate-to-iexecutor-interface-253 branch December 26, 2025 14:09
kcenon added a commit that referenced this pull request Apr 13, 2026
* feat(integration): add IExecutor-based async integration layer

Add new executor integration infrastructure using common_system's IExecutor
interface instead of direct thread_system dependency. This provides:

- standalone_executor: IExecutor implementation using std::jthread
- executor_integration: Manager class for runtime executor injection
- Updated thread_integration_detector.h with IExecutor detection

Benefits:
- No compile-time dependency on thread_system
- Runtime executor injection for flexibility
- Better testability with mock executors

Implements part of #253

* test(integration): add unit tests for executor_integration

Add comprehensive unit tests for the new IExecutor-based integration:

- Basic state tests (enable, disable, executor type)
- Task submission tests (sync, async, delayed)
- standalone_executor tests (basic, job execution, factory)
- Thread safety tests (concurrent state checks, task submission)
- Metrics tests (pending_tasks, worker_count)

All 16 tests pass successfully.

Part of #253

* docs(integration): add IExecutor integration documentation

Update THREAD_SYSTEM.md to include:

- IExecutor interface integration overview
- executor_integration API reference
- standalone_executor documentation
- Migration guide from thread_system_integration
- Updated related documentation links

Part of #253
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

refactor: migrate from thread_system direct dependency to IExecutor interface

1 participant