Raven Engine v0.1
Loading...
Searching...
No Matches
ThreadPool.h File Reference

Manages a pool of worker threads for executing jobs concurrently. More...

#include "Raven/Memory/Scope.h"
#include "Raven/Core/Types.h"
#include "Raven/Job/JobQueue.h"
#include "Raven/Job/Worker.h"
#include <atomic>
#include <condition_variable>
#include <mutex>
#include <thread>
#include <vector>

Classes

class  Raven::ThreadPool
 A thread pool for scheduling and executing jobs in parallel. More...

Namespaces

namespace  Raven

Detailed Description

Manages a pool of worker threads for executing jobs concurrently.

The ThreadPool class launches a specified number of worker threads that continuously fetch and execute jobs from a thread-safe queue. It supports dynamic fallback to a fraction of hardware threads if zero is requested. The pool will gracefully shut down on destruction, ensuring all threads are joined.

See also
JobQueue.h, Worker.h
Author
PhilikusHD