Hubris Engine Dev
A Project to learn and get into Game Engine developement.
 
Loading...
Searching...
No Matches
Hubris::ThreadPool Class Referencefinal

#include <ThreadPool.h>

Static Public Member Functions

static void InitalizePool (unsigned int threadCount=std::thread::hardware_concurrency() - 1)
 
static void QueueJob (WaitGroup *wg, std::function< void()> job)
 Queues a job to be executed by the threadpool, it may get executed by any thread in the pool.
 

Detailed Description

Definition at line 58 of file ThreadPool.h.

Member Function Documentation

◆ InitalizePool()

static void Hubris::ThreadPool::InitalizePool ( unsigned int threadCount = std::thread::hardware_concurrency() - 1)
inlinestatic

Definition at line 69 of file ThreadPool.h.

+ Here is the call graph for this function:

◆ QueueJob()

static void Hubris::ThreadPool::QueueJob ( WaitGroup * wg,
std::function< void()> job )
inlinestatic

Queues a job to be executed by the threadpool, it may get executed by any thread in the pool.

(planned behaviour) If wg is not null, the job is wrapped in a lambda that handles calling WaitGroup.Add() and WaitGroup.Done() appropriately.

Parameters
wgThis argument is here to support the upcoming (and completed) waitgroup
jobthe job to be added to the Queue, it may execute on any thread in the pool.

Definition at line 91 of file ThreadPool.h.


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