Untitled Game engine no.5  1.0
Public Member Functions | List of all members
Engine::JobSystem Class Reference

A glorified thread pool. More...

#include <Jobs.hpp>

Public Member Functions

 JobSystem ()=delete
 delete default constructor
 
 JobSystem (size_t num_threads)
 
void Stop ()
 Stop the running threads after they finish their current job.
 
void AddJob (func job)
 

Detailed Description

A glorified thread pool.

Constructor & Destructor Documentation

◆ JobSystem()

Engine::JobSystem::JobSystem ( size_t  num_threads)
inline

Constructor

Parameters
num_threadsthe number of worker threads to use
See also
MAX_JOB_THREADS

Member Function Documentation

◆ AddJob()

void Engine::JobSystem::AddJob ( func  job)
inline

Add a job to the queue

Parameters
jobto add to the queue

The documentation for this class was generated from the following file: