@@ -17,7 +17,7 @@ This project addresses the fundamental challenge faced by developers worldwide:
1717\subsection performance 🚀 Performance Excellence
1818- **Zero-overhead abstractions**: Modern C++ design ensures minimal runtime cost
1919- **Optimized data structures**: Lock-free algorithms and cache-friendly designs
20- - **Adaptive scheduling**: Priority -based job processing for optimal resource utilization
20+ - **Adaptive scheduling**: Type -based job processing for optimal resource utilization
2121- **Scalable architecture**: Linear performance scaling with hardware thread count
2222
2323\subsection reliability 🛡️ Production-Grade Reliability
@@ -58,13 +58,13 @@ Efficient worker thread management:
5858- **Factory functions**: Simple creation with sensible defaults
5959- See namespace \ref thread_pool_module for implementation details
6060
61- \subsection priority_thread_pool Priority Thread Pool System (priority_thread_pool_module )
62- Advanced priority -based task scheduling:
63- - **Configurable priorities **: Support for custom priority types and levels
64- - **Worker specialization**: Per-worker priority responsibility assignment
65- - **FIFO guarantee**: Strict ordering within same priority levels
66- - **O(log n) operations**: Optimized priority queue implementation
67- - See namespace \ref priority_thread_pool_module for advanced features
61+ \subsection typed_thread_pool Type-based Thread Pool System (typed_thread_pool_module )
62+ Advanced type -based task scheduling:
63+ - **Configurable job types **: Support for custom job type definitions and levels
64+ - **Worker specialization**: Per-worker type responsibility assignment
65+ - **FIFO guarantee**: Strict ordering within same type levels
66+ - **O(log n) operations**: Optimized type queue implementation
67+ - See namespace \ref typed_thread_pool_module for advanced features
6868
6969\subsection utilities Supporting Utilities (utility_module)
7070Essential infrastructure components:
@@ -109,31 +109,29 @@ Additional design considerations:
109109\subsection five_minute 🚀 5-Minute Setup
110110
111111\code{.cpp}
112- #include "priority_thread_pool .h"
113- using namespace priority_thread_pool_module ;
112+ #include "typed_thread_pool .h"
113+ using namespace typed_thread_pool_module ;
114114
115115int main() {
116116 // 1. Initialize logging
117117 log_module::start();
118118
119- // 2. Create priority thread pool
120- auto pool = std::make_shared<priority_thread_pool_t<job_priorities >>();
119+ // 2. Create type-based thread pool
120+ auto pool = std::make_shared<typed_thread_pool_t<job_types >>();
121121
122122 // 3. Add workers with different responsibilities
123- std::vector<std::unique_ptr<priority_thread_worker_t<job_priorities>>> workers;
124- workers.push_back(std::make_unique<priority_thread_worker_t<job_priorities>>(
125- std::vector<job_priorities>{job_priorities::High}));
126- pool->enqueue_batch(std::move(workers));
123+ pool->add_worker(job_types::High); // High type specialist
124+ pool->add_worker({job_types::High, job_types::Normal}); // Multi-type worker
127125
128126 // 4. Start processing
129127 pool->start();
130128
131- // 5. Submit jobs with priorities
132- pool->enqueue(std::make_unique<callback_priority_job_t<job_priorities >>(
129+ // 5. Submit jobs with types
130+ pool->enqueue(std::make_unique<callback_typed_job_t<job_types >>(
133131 []() -> result_void {
134- log_module::write_info("Processing high-priority task");
132+ log_module::write_info("Processing high-type task");
135133 return {};
136- }, job_priorities ::High));
134+ }, job_types ::High));
137135
138136 // 6. Clean shutdown
139137 pool->stop();
@@ -147,8 +145,8 @@ int main() {
147145The library includes comprehensive sample code demonstrating:
148146- **Basic logger usage**: High-performance, multi-target logging examples
149147- **Thread pool processing**: Simple job processing with automatic load balancing
150- - **Priority scheduling**: Sophisticated priority -based task management
151- - **Custom priority types**: Extending framework with domain-specific priorities
148+ - **Type-based scheduling**: Sophisticated type -based task management
149+ - **Custom job types**: Extending framework with domain-specific types
152150- **Error handling patterns**: Robust error management and recovery
153151- **Performance optimization**: Benchmarking and tuning techniques
154152
@@ -277,18 +275,18 @@ Key classes:
277275- thread_worker: Individual worker thread implementation
278276- Factory functions for easy pool creation
279277
280- \namespace priority_thread_pool_module
281- \brief Priority -based thread pool implementation for job scheduling with priorities .
278+ \namespace typed_thread_pool_module
279+ \brief Type -based thread pool implementation for job scheduling with custom types .
282280
283- The priority_thread_pool_module namespace extends the basic thread pool concept
284- with priority -based scheduling of jobs, allowing tasks to be processed according
285- to their importance rather than just their order of submission.
281+ The typed_thread_pool_module namespace extends the basic thread pool concept
282+ with type -based scheduling of jobs, allowing tasks to be processed according
283+ to their type classification rather than just their order of submission.
286284
287285Key classes:
288- - priority_thread_pool_t : Template-based priority pool
289- - priority_thread_worker_t : Worker with priority awareness
290- - priority_job_t : Jobs with associated priority levels
291- - priority_job_queue_t: Priority -aware job queue
286+ - typed_thread_pool_t : Template-based type pool
287+ - typed_thread_worker_t : Worker with type awareness
288+ - typed_job_t : Jobs with associated type levels
289+ - typed_job_queue_t: Type -aware job queue
292290
293291\namespace log_module
294292\brief Thread-safe logging system built on the thread system foundation.
0 commit comments