![]() |
Raven Engine v0.1
|
Defines the Worker class which processes jobs from a job queue on its own thread. More...
Classes | |
| class | Raven::Worker |
| Background thread that fetches and executes jobs from a JobQueue. More... | |
Namespaces | |
| namespace | Raven |
Defines the Worker class which processes jobs from a job queue on its own thread.
The Worker class encapsulates a single background thread that continuously polls a shared JobQueue for new jobs. When a job is available, the worker executes it by calling its Execute() method. If no jobs are pending, the worker yields to avoid busy-waiting. The worker can be started and stopped cleanly, ensuring the thread is joined on shutdown.