Thread System 0.3.1
High-performance C++20 thread pool with work stealing and DAG scheduling
Loading...
Searching...
No Matches
job_queue.h File Reference

Thread-safe FIFO job queue with optional bounded size. More...

#include "job.h"
#include <kcenon/thread/utils/formatter.h>
#include "callback_job.h"
#include <kcenon/thread/utils/convert_string.h>
#include "error_handling.h"
#include <kcenon/thread/interfaces/scheduler_interface.h>
#include <kcenon/thread/interfaces/queue_capabilities_interface.h>
#include <kcenon/thread/diagnostics/job_info.h>
#include <mutex>
#include <deque>
#include <tuple>
#include <atomic>
#include <optional>
#include <string_view>
#include <type_traits>
#include <condition_variable>
#include <memory>
#include <functional>
#include <kcenon/thread/utils/formatter_macros.h>
Include dependency graph for job_queue.h:
This graph shows which files directly or indirectly include this file:

Go to the source code of this file.

Classes

class  kcenon::thread::job_queue
 A thread-safe job queue for managing and dispatching work items. More...
 
struct  kcenon::thread::job_queue::memory_stats
 Get memory footprint statistics for the queue. More...
 
struct  std::formatter< kcenon::thread::job_queue >
 
struct  std::formatter< kcenon::thread::job_queue, wchar_t >
 

Namespaces

namespace  kcenon
 
namespace  kcenon::thread
 Core threading foundation of the thread system library.
 

Detailed Description

Thread-safe FIFO job queue with optional bounded size.

Provides a mutex-based job queue supporting enqueue, blocking/non-blocking dequeue, batch operations, and graceful shutdown. Implements both scheduler_interface and queue_capabilities_interface.

See also
adaptive_job_queue For the auto-switching mutex/lock-free queue
lockfree_job_queue For the lock-free Michael-Scott queue

Definition in file job_queue.h.