|
Thread System 0.3.1
High-performance C++20 thread pool with work stealing and DAG scheduling
|
Adaptive job queue sample comparing policies and demonstrating mode switching. More...
#include <kcenon/thread/queue/adaptive_job_queue.h>#include <kcenon/thread/core/callback_job.h>#include <thread>#include <vector>#include <atomic>#include <chrono>#include <random>#include <iostream>#include <iomanip>
Go to the source code of this file.
Functions | |
| std::string | mode_to_string (adaptive_job_queue::mode m) |
| void | policy_comparison_example () |
| void | adaptive_behavior_example () |
| void | different_policies_example () |
| void | performance_monitoring_example () |
| void | web_server_simulation () |
| int | main () |
Adaptive job queue sample comparing policies and demonstrating mode switching.
Definition in file adaptive_queue_sample.cpp.
| void adaptive_behavior_example | ( | ) |
Definition at line 134 of file adaptive_queue_sample.cpp.
References kcenon::thread::adaptive_job_queue::current_mode(), kcenon::thread::adaptive_job_queue::dequeue(), kcenon::thread::adaptive_job_queue::enqueue(), kcenon::thread::result< T >::is_ok(), mode_to_string(), kcenon::thread::running, and kcenon::thread::result< T >::value().
Referenced by main().


| void different_policies_example | ( | ) |
Definition at line 233 of file adaptive_queue_sample.cpp.
References kcenon::thread::adaptive_job_queue::current_mode(), kcenon::thread::adaptive_job_queue::dequeue(), kcenon::thread::adaptive_job_queue::empty(), kcenon::thread::adaptive_job_queue::enqueue(), kcenon::thread::result< T >::is_ok(), mode_to_string(), and kcenon::thread::result< T >::value().
Referenced by main().


| int main | ( | ) |
Definition at line 437 of file adaptive_queue_sample.cpp.
References adaptive_behavior_example(), different_policies_example(), performance_monitoring_example(), policy_comparison_example(), and web_server_simulation().

| std::string mode_to_string | ( | adaptive_job_queue::mode | m | ) |
Definition at line 33 of file adaptive_queue_sample.cpp.
Referenced by adaptive_behavior_example(), different_policies_example(), and performance_monitoring_example().

| void performance_monitoring_example | ( | ) |
Definition at line 285 of file adaptive_queue_sample.cpp.
References kcenon::thread::adaptive_job_queue::current_mode(), kcenon::thread::adaptive_job_queue::dequeue(), kcenon::thread::adaptive_job_queue::enqueue(), kcenon::thread::adaptive_job_queue::get_stats(), kcenon::thread::result< T >::is_ok(), mode_to_string(), kcenon::thread::running, and kcenon::thread::result< T >::value().
Referenced by main().


| void policy_comparison_example | ( | ) |
Definition at line 42 of file adaptive_queue_sample.cpp.
References kcenon::thread::adaptive_job_queue::dequeue(), kcenon::thread::job::do_work(), kcenon::thread::adaptive_job_queue::enqueue(), kcenon::thread::result< T >::is_ok(), and kcenon::thread::result< T >::value().
Referenced by main().


| void web_server_simulation | ( | ) |
Definition at line 357 of file adaptive_queue_sample.cpp.
References kcenon::thread::adaptive_job_queue::dequeue(), kcenon::thread::adaptive_job_queue::enqueue(), kcenon::thread::adaptive_job_queue::get_stats(), kcenon::thread::result< T >::is_ok(), and kcenon::thread::result< T >::value().
Referenced by main().

