Summary
Evaluate and simplify the typed_pool template hierarchy to reduce complexity while maintaining type safety, following Simple Design principle of "Fewest Elements".
Current State
Parallel class hierarchies exist:
| Standard Pool |
Typed Pool |
thread_pool |
typed_thread_pool_t<JobType> |
thread_worker |
typed_thread_worker_t<JobType> |
job |
typed_job_t<JobType> |
job_queue |
typed_job_queue_t<JobType> |
Directory: /include/kcenon/thread/impl/typed_pool/ contains 10+ template files
Problem Analysis
- Entire parallel hierarchy for type-safe pooling
- Increases codebase complexity significantly
- May be over-engineered for use cases
- Violates "Fewest Elements" principle
Analysis Tasks
Potential Simplifications
Option A: Keep but document
- If typed_pool provides measurable benefits, document use cases clearly
- Add usage examples in docs/
Option B: Merge with base classes
- Use template specialization on base classes
- Reduce from 2 hierarchies to 1
Option C: Remove typed_pool
- If usage is minimal, deprecate and remove
- Guide users to standard pool with std::any
Acceptance Criteria
Notes
This issue requires analysis before implementation. May result in "no change" if typed_pool provides significant value.
Summary
Evaluate and simplify the typed_pool template hierarchy to reduce complexity while maintaining type safety, following Simple Design principle of "Fewest Elements".
Current State
Parallel class hierarchies exist:
thread_pooltyped_thread_pool_t<JobType>thread_workertyped_thread_worker_t<JobType>jobtyped_job_t<JobType>job_queuetyped_job_queue_t<JobType>Directory:
/include/kcenon/thread/impl/typed_pool/contains 10+ template filesProblem Analysis
Analysis Tasks
Potential Simplifications
Option A: Keep but document
Option B: Merge with base classes
Option C: Remove typed_pool
Acceptance Criteria
Notes
This issue requires analysis before implementation. May result in "no change" if typed_pool provides significant value.